Enum distant_net::common::CompressionType
source · pub enum CompressionType {
Deflate,
Gzip,
Zlib,
Unknown,
}Expand description
Represents the type of compression for a CompressionCodec
Variants
Implementations
sourceimpl CompressionType
impl CompressionType
sourcepub const fn known_variants() -> &'static [CompressionType]
pub const fn known_variants() -> &'static [CompressionType]
Returns a list of all variants of the type except unknown.
sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true if type is unknown
sourcepub fn new_codec(&self, level: CompressionLevel) -> Result<CompressionCodec>
pub fn new_codec(&self, level: CompressionLevel) -> Result<CompressionCodec>
Creates a new CompressionCodec for this type, failing if this type is unknown
Trait Implementations
sourceimpl Clone for CompressionType
impl Clone for CompressionType
sourcefn clone(&self) -> CompressionType
fn clone(&self) -> CompressionType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for CompressionType
impl Debug for CompressionType
sourceimpl<'de> Deserialize<'de> for CompressionType
impl<'de> Deserialize<'de> for CompressionType
sourcefn 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
sourceimpl Hash for CompressionType
impl Hash for CompressionType
sourceimpl PartialEq<CompressionType> for CompressionType
impl PartialEq<CompressionType> for CompressionType
sourcefn eq(&self, other: &CompressionType) -> bool
fn eq(&self, other: &CompressionType) -> bool
sourceimpl Serialize for CompressionType
impl Serialize for CompressionType
impl Copy for CompressionType
impl Eq for CompressionType
impl StructuralEq for CompressionType
impl StructuralPartialEq for CompressionType
Auto Trait Implementations
impl RefUnwindSafe for CompressionType
impl Send for CompressionType
impl Sync for CompressionType
impl Unpin for CompressionType
impl UnwindSafe for CompressionType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more