Struct flate2::Compression
source · [−]pub struct Compression(_);
Expand description
When compressing data, the compression level can be specified by a value in this enum.
Implementations
sourceimpl Compression
impl Compression
sourcepub const fn new(level: u32) -> Compression
pub const fn new(level: u32) -> Compression
Creates a new description of the compression level with an explicitly specified integer.
The integer here is typically on a scale of 0-9 where 0 means “no compression” and 9 means “take as long as you’d like”.
sourcepub const fn none() -> Compression
pub const fn none() -> Compression
No compression is to be performed, this may actually inflate data slightly when encoding.
sourcepub const fn fast() -> Compression
pub const fn fast() -> Compression
Optimize for the best speed of encoding.
sourcepub const fn best() -> Compression
pub const fn best() -> Compression
Optimize for the size of data being encoded.
Trait Implementations
sourceimpl Clone for Compression
impl Clone for Compression
sourcefn clone(&self) -> Compression
fn clone(&self) -> Compression
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Compression
impl Debug for Compression
sourceimpl Default for Compression
impl Default for Compression
sourcefn default() -> Compression
fn default() -> Compression
Returns the “default value” for a type. Read more
sourceimpl PartialEq<Compression> for Compression
impl PartialEq<Compression> for Compression
sourcefn eq(&self, other: &Compression) -> bool
fn eq(&self, other: &Compression) -> bool
impl Copy for Compression
impl Eq for Compression
impl StructuralEq for Compression
impl StructuralPartialEq for Compression
Auto Trait Implementations
impl RefUnwindSafe for Compression
impl Send for Compression
impl Sync for Compression
impl Unpin for Compression
impl UnwindSafe for Compression
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