Struct zarrs::array::codec::bytes_to_bytes::zstd::ZstdCompressionLevel
source · pub struct ZstdCompressionLevel(/* private fields */);
Available on crate feature
zstd
only.Expand description
A Zstd
compression level. An integer from -131072 to 22 which controls the speed and level of compression (has no impact on decoding).
A value of 0 indicates to use the default compression level. Otherwise, a higher level is expected to achieve a higher compression ratio at the cost of lower speed.
Implementations§
source§impl ZstdCompressionLevel
impl ZstdCompressionLevel
sourcepub const fn new(level: CompressionLevel) -> Self
pub const fn new(level: CompressionLevel) -> Self
Create a new Zstd
compression level.
Trait Implementations§
source§impl Clone for ZstdCompressionLevel
impl Clone for ZstdCompressionLevel
source§fn clone(&self) -> ZstdCompressionLevel
fn clone(&self) -> ZstdCompressionLevel
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 ZstdCompressionLevel
impl Debug for ZstdCompressionLevel
source§impl<'de> Deserialize<'de> for ZstdCompressionLevel
impl<'de> Deserialize<'de> for ZstdCompressionLevel
source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ZstdCompressionLevel> for CompressionLevel
impl From<ZstdCompressionLevel> for CompressionLevel
source§fn from(value: ZstdCompressionLevel) -> Self
fn from(value: ZstdCompressionLevel) -> Self
Converts to this type from the input type.
source§impl From<i32> for ZstdCompressionLevel
impl From<i32> for ZstdCompressionLevel
source§fn from(value: CompressionLevel) -> Self
fn from(value: CompressionLevel) -> Self
Converts to this type from the input type.
source§impl PartialEq for ZstdCompressionLevel
impl PartialEq for ZstdCompressionLevel
source§fn eq(&self, other: &ZstdCompressionLevel) -> bool
fn eq(&self, other: &ZstdCompressionLevel) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ZstdCompressionLevel
impl Serialize for ZstdCompressionLevel
impl Eq for ZstdCompressionLevel
impl StructuralPartialEq for ZstdCompressionLevel
Auto Trait Implementations§
impl Freeze for ZstdCompressionLevel
impl RefUnwindSafe for ZstdCompressionLevel
impl Send for ZstdCompressionLevel
impl Sync for ZstdCompressionLevel
impl Unpin for ZstdCompressionLevel
impl UnwindSafe for ZstdCompressionLevel
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.