pub struct ZstdLevel(/* private fields */);
Expand description
Represents a valid zstd compression level.
Implementations§
source§impl ZstdLevel
impl ZstdLevel
sourcepub fn try_new(level: i32) -> Result<ZstdLevel, Error>
pub fn try_new(level: i32) -> Result<ZstdLevel, Error>
Attempts to create a zstd compression level from a given compression level.
Compression levels must be valid (i.e. be acceptable for [zstd::compression_level_range
]).
sourcepub fn compression_level(&self) -> i32
pub fn compression_level(&self) -> i32
Returns the compression level.
Trait Implementations§
source§impl PartialEq for ZstdLevel
impl PartialEq for ZstdLevel
impl Copy for ZstdLevel
impl Eq for ZstdLevel
impl StructuralPartialEq for ZstdLevel
Auto Trait Implementations§
impl Freeze for ZstdLevel
impl RefUnwindSafe for ZstdLevel
impl Send for ZstdLevel
impl Sync for ZstdLevel
impl Unpin for ZstdLevel
impl UnwindSafe for ZstdLevel
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more