pub struct MemoryLevel(/* private fields */);Expand description
How much memory the compressor buffers symbols in (zlib’s
memLevel, 1 to 9): a block holds up to 2^(level + 6) - 1 symbols.
use pltrs_codec::deflate::MemoryLevel;
assert_eq!(MemoryLevel::new(8)?, MemoryLevel::DEFAULT);
assert!(MemoryLevel::new(0).is_err());Implementations§
Source§impl MemoryLevel
impl MemoryLevel
Sourcepub const fn new(level: u8) -> Result<Self, InvalidMemoryLevel>
pub const fn new(level: u8) -> Result<Self, InvalidMemoryLevel>
The memory level level, which must be between 1 and 9.
Trait Implementations§
Source§impl Clone for MemoryLevel
impl Clone for MemoryLevel
impl Copy for MemoryLevel
Source§impl Debug for MemoryLevel
impl Debug for MemoryLevel
Source§impl Default for MemoryLevel
impl Default for MemoryLevel
impl Eq for MemoryLevel
Source§impl Hash for MemoryLevel
impl Hash for MemoryLevel
Source§impl Ord for MemoryLevel
impl Ord for MemoryLevel
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for MemoryLevel
impl PartialEq for MemoryLevel
Source§impl PartialOrd for MemoryLevel
impl PartialOrd for MemoryLevel
impl StructuralPartialEq for MemoryLevel
Auto Trait Implementations§
impl Forget for MemoryLevel
impl Freeze for MemoryLevel
impl Move for MemoryLevel
impl RefUnwindSafe for MemoryLevel
impl Send for MemoryLevel
impl Sync for MemoryLevel
impl Unpin for MemoryLevel
impl UnsafeUnpin for MemoryLevel
impl UnwindSafe for MemoryLevel
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