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>
source§impl<'bytes> ReaderWithOptions<Copied<'bytes>> for File<'static>
impl<'bytes> ReaderWithOptions<Copied<'bytes>> for File<'static>
Auto Trait Implementations§
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