Enum otter_api_tests::zipfile::CompressionMethod [−]
pub enum CompressionMethod {
Stored,
Deflated,
Bzip2,
Unsupported(u16),
}Expand description
Identifies the storage format used to compress a file within a ZIP archive.
Each file’s compression method is stored alongside it, allowing the contents to be read without context.
When creating ZIP files, you may choose the method to use with
[zip::write::FileOptions::compression_method]
Variants
Store the file as is
Compress the file using Deflate
Compress the file using BZIP2
Unsupported(u16)use the constants instead
Unsupported compression method
Implementations
impl CompressionMethod
impl CompressionMethodAll compression methods defined for the ZIP format
pub const STORE: CompressionMethodpub const SHRINK: CompressionMethodpub const REDUCE_1: CompressionMethodpub const REDUCE_2: CompressionMethodpub const REDUCE_3: CompressionMethodpub const REDUCE_4: CompressionMethodpub const IMPLODE: CompressionMethodpub const DEFLATE: CompressionMethodpub const DEFLATE64: CompressionMethodpub const PKWARE_IMPLODE: CompressionMethodpub const BZIP2: CompressionMethodpub const LZMA: CompressionMethodpub const IBM_ZOS_CMPSC: CompressionMethodpub const IBM_TERSE: CompressionMethodpub const ZSTD_DEPRECATED: CompressionMethodpub const ZSTD: CompressionMethodpub const MP3: CompressionMethodpub const XZ: CompressionMethodpub const JPEG: CompressionMethodpub const WAVPACK: CompressionMethodpub const PPMD: CompressionMethodimpl CompressionMethod
impl CompressionMethodpub fn from_u16(val: u16) -> CompressionMethod👎 Deprecated since 0.5.7: use a constant to construct a compression method
pub fn from_u16(val: u16) -> CompressionMethoduse a constant to construct a compression method
Converts an u16 to its corresponding CompressionMethod
Trait Implementations
impl Clone for CompressionMethod
impl Clone for CompressionMethodpub fn clone(&self) -> CompressionMethod
pub fn clone(&self) -> CompressionMethodReturns a copy of the value. Read more
Performs copy-assignment from source. Read more
impl Debug for CompressionMethod
impl Debug for CompressionMethodimpl Display for CompressionMethod
impl Display for CompressionMethodimpl PartialEq<CompressionMethod> for CompressionMethod
impl PartialEq<CompressionMethod> for CompressionMethodpub fn eq(&self, other: &CompressionMethod) -> bool
pub fn eq(&self, other: &CompressionMethod) -> boolThis method tests for self and other values to be equal, and is used
by ==. Read more
pub fn ne(&self, other: &CompressionMethod) -> bool
pub fn ne(&self, other: &CompressionMethod) -> boolThis method tests for !=.
impl Copy for CompressionMethodimpl Eq for CompressionMethodimpl StructuralEq for CompressionMethodimpl StructuralPartialEq for CompressionMethodAuto Trait Implementations
impl RefUnwindSafe for CompressionMethodimpl Send for CompressionMethodimpl Sync for CompressionMethodimpl Unpin for CompressionMethodimpl UnwindSafe for CompressionMethodBlanket Implementations
Mutably borrows from an owned value. Read more
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
A: Allocator + 'static,
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
A: Allocator + 'static,
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read more
impl<A> DynCastExt for A
impl<A> DynCastExt for Apub fn dyn_cast<T>(
self
) -> Result<<A as DynCastExtHelper<T>>::Target, <A as DynCastExtHelper<T>>::Source> where
T: ?Sized,
A: DynCastExtHelper<T>,
pub fn dyn_cast<T>(
self
) -> Result<<A as DynCastExtHelper<T>>::Target, <A as DynCastExtHelper<T>>::Source> where
T: ?Sized,
A: DynCastExtHelper<T>, Use this to cast from one trait object type to another. Read more
pub fn dyn_upcast<T>(self) -> <A as DynCastExtAdvHelper<T, T>>::Target where
T: ?Sized,
A: DynCastExtAdvHelper<T, T, Source = <A as DynCastExtAdvHelper<T, T>>::Target>,
pub fn dyn_upcast<T>(self) -> <A as DynCastExtAdvHelper<T, T>>::Target where
T: ?Sized,
A: DynCastExtAdvHelper<T, T, Source = <A as DynCastExtAdvHelper<T, T>>::Target>, Use this to upcast a trait to one of its supertraits. Read more
pub fn dyn_cast_adv<F, T>(
self
) -> Result<<A as DynCastExtAdvHelper<F, T>>::Target, <A as DynCastExtAdvHelper<F, T>>::Source> where
T: ?Sized,
A: DynCastExtAdvHelper<F, T>,
F: ?Sized,
pub fn dyn_cast_adv<F, T>(
self
) -> Result<<A as DynCastExtAdvHelper<F, T>>::Target, <A as DynCastExtAdvHelper<F, T>>::Source> where
T: ?Sized,
A: DynCastExtAdvHelper<F, T>,
F: ?Sized, pub fn dyn_cast_with_config<C>(
self
) -> Result<<A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Target, <A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Source> where
C: DynCastConfig,
A: DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>,
pub fn dyn_cast_with_config<C>(
self
) -> Result<<A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Target, <A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Source> where
C: DynCastConfig,
A: DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>, Use this to cast from one trait object type to another. With this method the type parameter is a config type that uniquely specifies which cast should be preformed. Read more
Compare self to key and return true if they are equal.
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;pub fn vzip(self) -> V