pub enum CompressionType {
None,
Gzip,
Zstd,
}Expand description
Compression type detection
Variants§
Implementations§
Source§impl CompressionType
impl CompressionType
Sourcepub fn from_media_type(media_type: &str) -> Option<Self>
pub fn from_media_type(media_type: &str) -> Option<Self>
Detect compression type from media type string Returns None if media type is unrecognized (caller should use magic bytes)
Sourcepub fn from_magic_bytes(data: &[u8]) -> Self
pub fn from_magic_bytes(data: &[u8]) -> Self
Detect compression type from magic bytes
Trait Implementations§
Source§impl Clone for CompressionType
impl Clone for CompressionType
impl Copy for CompressionType
Source§impl Debug for CompressionType
impl Debug for CompressionType
impl Eq for CompressionType
Source§impl PartialEq for CompressionType
impl PartialEq for CompressionType
impl StructuralPartialEq for CompressionType
Auto Trait Implementations§
impl Forget for CompressionType
impl Freeze for CompressionType
impl Move for CompressionType
impl RefUnwindSafe for CompressionType
impl Send for CompressionType
impl Sync for CompressionType
impl Unpin for CompressionType
impl UnsafeUnpin for CompressionType
impl UnwindSafe for CompressionType
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.