pub enum Compressors {
Zstd(Zstd),
Lz4(Lz4),
}
Expand description
Enum with different Compression
types.
Variants§
Zstd(Zstd)
Zstandard compression algorithm with custom settings.
Lz4(Lz4)
LZ4 compression algorithm with custom settings.
Trait Implementations§
Source§impl Compression for Compressors
impl Compression for Compressors
Source§fn decompress_to(
&self,
value: &[u8],
dest: &mut Vec<u8>,
) -> Result<(), NippyJarError>
fn decompress_to( &self, value: &[u8], dest: &mut Vec<u8>, ) -> Result<(), NippyJarError>
Appends decompressed data to the dest buffer. Requires
dest
to have sufficient capacity.Source§fn decompress(&self, value: &[u8]) -> Result<Vec<u8>, NippyJarError>
fn decompress(&self, value: &[u8]) -> Result<Vec<u8>, NippyJarError>
Returns decompressed data.
Source§fn compress_to(
&self,
src: &[u8],
dest: &mut Vec<u8>,
) -> Result<usize, NippyJarError>
fn compress_to( &self, src: &[u8], dest: &mut Vec<u8>, ) -> Result<usize, NippyJarError>
Appends compressed data from
src
to dest
. dest
. Requires dest
to have sufficient
capacity. Read moreSource§impl Debug for Compressors
impl Debug for Compressors
Source§impl<'de> Deserialize<'de> for Compressors
impl<'de> Deserialize<'de> for Compressors
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Compressors
impl RefUnwindSafe for Compressors
impl Send for Compressors
impl Sync for Compressors
impl Unpin for Compressors
impl UnwindSafe for Compressors
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> NippyJarHeader for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
Zstd
: 32 bytesLz4
: 0 bytes