pub struct GzipLevel(_);
Available on crate feature
feature
only.Expand description
Represents a valid gzip compression level.
Implementations
impl GzipLevel
impl GzipLevel
pub fn try_new(level: u8) -> Result<GzipLevel, Error>
pub fn try_new(level: u8) -> Result<GzipLevel, Error>
Attempts to create a gzip compression level.
Compression levels must be valid (i.e. be acceptable for flate2::Compression
).
pub fn compression_level(&self) -> u8
pub fn compression_level(&self) -> u8
Returns the compression level.
Trait Implementations
impl CompressionLevel<u8> for GzipLevel
impl CompressionLevel<u8> for GzipLevel
const MINIMUM_LEVEL: u8 = 0u8
const MAXIMUM_LEVEL: u8 = 10u8
fn is_valid_level(level: T) -> Result<(), Error>
fn is_valid_level(level: T) -> Result<(), Error>
Tests if the provided compression level is valid.
impl Copy for GzipLevel
impl Eq for GzipLevel
impl StructuralEq for GzipLevel
impl StructuralPartialEq for GzipLevel
Auto Trait Implementations
impl RefUnwindSafe for GzipLevel
impl Send for GzipLevel
impl Sync for GzipLevel
impl Unpin for GzipLevel
impl UnwindSafe for GzipLevel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.