pub enum CompressionOutcome {
Compressed,
BelowThreshold,
NotSmaller,
WriteOverLimit,
Decompressed,
FallbackRaw,
ReadOverLimit,
}Expand description
Compression outcomes for writes and reads.
Variants§
Compressed
Write: the payload met the threshold and the marked zstd frame was smaller than the escaped raw form.
BelowThreshold
Write: the payload was below the threshold and was stored raw.
NotSmaller
Write: compression ran but did not shrink the payload; stored raw.
WriteOverLimit
Write: the payload exceeds the decompression cap and was stored raw so a read could still accept it; a capacity signal.
Decompressed
Read: a marked zstd frame decoded successfully.
FallbackRaw
Read: zstd rejected a marked payload as malformed or truncated; the stored bytes were handed through untouched.
ReadOverLimit
Read: decompressing would exceed the cap; the stored bytes were handed through untouched. An integrity signal.
Implementations§
Trait Implementations§
Source§impl Clone for CompressionOutcome
impl Clone for CompressionOutcome
Source§fn clone(&self) -> CompressionOutcome
fn clone(&self) -> CompressionOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CompressionOutcome
Source§impl Debug for CompressionOutcome
impl Debug for CompressionOutcome
Source§impl Display for CompressionOutcome
impl Display for CompressionOutcome
impl Eq for CompressionOutcome
Source§impl Hash for CompressionOutcome
impl Hash for CompressionOutcome
Source§impl PartialEq for CompressionOutcome
impl PartialEq for CompressionOutcome
Source§fn eq(&self, other: &CompressionOutcome) -> bool
fn eq(&self, other: &CompressionOutcome) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CompressionOutcome
Auto Trait Implementations§
impl Freeze for CompressionOutcome
impl RefUnwindSafe for CompressionOutcome
impl Send for CompressionOutcome
impl Sync for CompressionOutcome
impl Unpin for CompressionOutcome
impl UnsafeUnpin for CompressionOutcome
impl UnwindSafe for CompressionOutcome
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.