pub struct NoneCompressor;Expand description
No-op compressor that passes data through unchanged.
Trait Implementations§
Source§impl Compressor for NoneCompressor
impl Compressor for NoneCompressor
Source§fn compress(&self, data: &[u8]) -> Result<Vec<u8>, FormatError>
fn compress(&self, data: &[u8]) -> Result<Vec<u8>, FormatError>
Compress data and return the compressed bytes.
Source§fn decompress(
&self,
data: &[u8],
_uncompressed_size: usize,
) -> Result<Vec<u8>, FormatError>
fn decompress( &self, data: &[u8], _uncompressed_size: usize, ) -> Result<Vec<u8>, FormatError>
Decompress data given the expected uncompressed size.
Source§fn compression_type(&self) -> CompressionV2
fn compression_type(&self) -> CompressionV2
Get the compression type.
Auto Trait Implementations§
impl Freeze for NoneCompressor
impl RefUnwindSafe for NoneCompressor
impl Send for NoneCompressor
impl Sync for NoneCompressor
impl Unpin for NoneCompressor
impl UnsafeUnpin for NoneCompressor
impl UnwindSafe for NoneCompressor
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