[−][src]Struct libdeflater::CompressionLvl
Compression level used by a Compressor
instance.
Implementations
impl CompressionLvl
[src]
pub fn new(level: i32) -> Result<CompressionLvl, CompressionLvlError>
[src]
Try to create a valid
CompressionLvl
from a numeric
value.
If level
is a valid custom compression level for libdeflate,
returns a Result::Ok(CompressionLvl)
. Otherwise, returns
Result::Error(error)
.
Valid compression levels for libdeflate, at time of writing, are 1-12.
pub fn fastest() -> CompressionLvl
[src]
Returns the fastest compression level. This compression level offers the highest performance but lowest compression ratio.
pub fn best() -> CompressionLvl
[src]
Returns the best compression level, in terms of compression ratio. This compression level offers the best compression ratio but lowest performance.
pub fn iter() -> CompressionLvlIter
[src]
Returns an iterator that emits all compression levels
supported by libdeflate
in ascending order.
Trait Implementations
impl Clone for CompressionLvl
[src]
fn clone(&self) -> CompressionLvl
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for CompressionLvl
[src]
impl Debug for CompressionLvl
[src]
impl Default for CompressionLvl
[src]
fn default() -> CompressionLvl
[src]
Returns the default compression level reccomended by libdeflate.
impl Eq for CompressionLvl
[src]
impl PartialEq<CompressionLvl> for CompressionLvl
[src]
fn eq(&self, other: &CompressionLvl) -> bool
[src]
fn ne(&self, other: &CompressionLvl) -> bool
[src]
impl StructuralEq for CompressionLvl
[src]
impl StructuralPartialEq for CompressionLvl
[src]
Auto Trait Implementations
impl RefUnwindSafe for CompressionLvl
impl Send for CompressionLvl
impl Sync for CompressionLvl
impl Unpin for CompressionLvl
impl UnwindSafe for CompressionLvl
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,