#[repr(u8)]pub enum CompressionAlgorithm {
Zstd = 0,
Lz4 = 1,
}Expand description
The compression algorithm used to compress the chunks.
Variants§
Implementations§
Source§impl CompressionAlgorithm
impl CompressionAlgorithm
Sourcepub fn decompressor(&self) -> Decompressor
pub fn decompressor(&self) -> Decompressor
Returns a decompressor that can decompress a chunk compressed with this compression algorithm.
Sourcepub fn thread_local_decompressor(&self) -> ThreadLocalDecompressor
pub fn thread_local_decompressor(&self) -> ThreadLocalDecompressor
Returns a decompressor that can decompress a chunk compressed with this compression algorithm. Some decompressors require a large state object that is expensive to create but can be reused for many decompressions. A thread-local decompressor stores the state object in a thread-local variable.
Trait Implementations§
Source§impl Clone for CompressionAlgorithm
impl Clone for CompressionAlgorithm
Source§fn clone(&self) -> CompressionAlgorithm
fn clone(&self) -> CompressionAlgorithm
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompressionAlgorithm
impl Debug for CompressionAlgorithm
Source§impl PartialEq for CompressionAlgorithm
impl PartialEq for CompressionAlgorithm
Source§impl TryFrom<u8> for CompressionAlgorithm
impl TryFrom<u8> for CompressionAlgorithm
Source§type Error = ChunkedArchiveError
type Error = ChunkedArchiveError
The type returned in the event of a conversion error.
Source§fn try_from(
value: u8,
) -> Result<CompressionAlgorithm, <CompressionAlgorithm as TryFrom<u8>>::Error>
fn try_from( value: u8, ) -> Result<CompressionAlgorithm, <CompressionAlgorithm as TryFrom<u8>>::Error>
Performs the conversion.
impl Copy for CompressionAlgorithm
impl Eq for CompressionAlgorithm
impl StructuralPartialEq for CompressionAlgorithm
Auto Trait Implementations§
impl Freeze for CompressionAlgorithm
impl RefUnwindSafe for CompressionAlgorithm
impl Send for CompressionAlgorithm
impl Sync for CompressionAlgorithm
impl Unpin for CompressionAlgorithm
impl UnsafeUnpin for CompressionAlgorithm
impl UnwindSafe for CompressionAlgorithm
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more