pub struct File<'bytes> { /* private fields */ }
Expand description
Represents a file within the TES4 virtual filesystem.
Implementations§
Source§impl<'bytes> File<'bytes>
impl<'bytes> File<'bytes>
pub fn compress(&self, options: &CompressionOptions) -> Result<File<'static>>
pub fn decompress(&self, options: &CompressionOptions) -> Result<File<'static>>
pub fn decompressed_len(&self) -> Option<usize>
pub fn is_compressed(&self) -> bool
pub fn is_decompressed(&self) -> bool
pub fn write<Out>( &self, stream: &mut Out, options: &CompressionOptions, ) -> Result<()>
Source§impl<'bytes> File<'bytes>
impl<'bytes> File<'bytes>
pub fn compress_into( &self, out: &mut Vec<u8>, options: &CompressionOptions, ) -> Result<()>
pub fn decompress_into( &self, out: &mut Vec<u8>, options: &CompressionOptions, ) -> Result<()>
Trait Implementations§
Source§impl<'bytes> CompressableFrom<&'bytes [u8]> for File<'bytes>
impl<'bytes> CompressableFrom<&'bytes [u8]> for File<'bytes>
Source§fn from_compressed(value: &'bytes [u8], decompressed_len: usize) -> Self
fn from_compressed(value: &'bytes [u8], decompressed_len: usize) -> Self
Makes a compressed instance of
Self
using the given data.Source§fn from_decompressed(value: &'bytes [u8]) -> Self
fn from_decompressed(value: &'bytes [u8]) -> Self
Makes a decompressed instance of
Self
using the given data.Source§impl ReaderWithOptions<&File> for File<'static>
impl ReaderWithOptions<&File> for File<'static>
Source§impl ReaderWithOptions<&Path> for File<'static>
impl ReaderWithOptions<&Path> for File<'static>
Source§impl<'bytes> ReaderWithOptions<Borrowed<'bytes>> for File<'bytes>
impl<'bytes> ReaderWithOptions<Borrowed<'bytes>> for File<'bytes>
Auto Trait Implementations§
impl<'bytes> Freeze for File<'bytes>
impl<'bytes> RefUnwindSafe for File<'bytes>
impl<'bytes> Send for File<'bytes>
impl<'bytes> Sync for File<'bytes>
impl<'bytes> Unpin for File<'bytes>
impl<'bytes> UnwindSafe for File<'bytes>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more