Struct noodles_bgzf::writer::CompressionLevel
source · pub struct CompressionLevel(/* private fields */);
Expand description
A DEFLATE compression level.
Implementations§
source§impl CompressionLevel
impl CompressionLevel
sourcepub const fn new(n: u8) -> Option<Self>
pub const fn new(n: u8) -> Option<Self>
Creates a compression level.
§Examples
use noodles_bgzf::writer::CompressionLevel;
assert_eq!(CompressionLevel::new(0), Some(CompressionLevel::NONE));
assert!(CompressionLevel::new(255).is_none());
sourcepub const fn get(&self) -> u8
pub const fn get(&self) -> u8
Returns the inner value.
§Examples
use noodles_bgzf::writer::CompressionLevel;
assert_eq!(CompressionLevel::NONE.get(), 0);
sourcepub fn none() -> Self
👎Deprecated since 0.29.0: Use CompressionLevel::NONE
instead.
pub fn none() -> Self
CompressionLevel::NONE
instead.Returns a compression level to disable compression.
§Examples
use noodles_bgzf::writer::CompressionLevel;
let compression_level = CompressionLevel::none();
Trait Implementations§
source§impl Clone for CompressionLevel
impl Clone for CompressionLevel
source§fn clone(&self) -> CompressionLevel
fn clone(&self) -> CompressionLevel
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CompressionLevel
impl Debug for CompressionLevel
source§impl Default for CompressionLevel
impl Default for CompressionLevel
source§impl From<CompressionLevel> for Compression
impl From<CompressionLevel> for Compression
source§fn from(compression_level: CompressionLevel) -> Self
fn from(compression_level: CompressionLevel) -> Self
Converts to this type from the input type.
source§impl From<CompressionLevel> for u8
impl From<CompressionLevel> for u8
source§fn from(compression_level: CompressionLevel) -> Self
fn from(compression_level: CompressionLevel) -> Self
Converts to this type from the input type.
source§impl Ord for CompressionLevel
impl Ord for CompressionLevel
source§fn cmp(&self, other: &CompressionLevel) -> Ordering
fn cmp(&self, other: &CompressionLevel) -> Ordering
1.21.0 · 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
source§impl PartialEq for CompressionLevel
impl PartialEq for CompressionLevel
source§impl PartialOrd for CompressionLevel
impl PartialOrd for CompressionLevel
source§impl TryFrom<u8> for CompressionLevel
impl TryFrom<u8> for CompressionLevel
impl Copy for CompressionLevel
impl Eq for CompressionLevel
impl StructuralPartialEq for CompressionLevel
Auto Trait Implementations§
impl Freeze for CompressionLevel
impl RefUnwindSafe for CompressionLevel
impl Send for CompressionLevel
impl Sync for CompressionLevel
impl Unpin for CompressionLevel
impl UnwindSafe for CompressionLevel
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)