pub struct ZstdThreads(pub(crate) u32);Expand description
The amount of threads to use when compressing using zstd.
The default (1) adheres to the one selected by the zstd executable.
If the custom amount of 0 is used, all available physical CPU cores are used.
Tuple Fields§
§0: u32Implementations§
Source§impl ZstdThreads
impl ZstdThreads
Sourcepub fn new(threads: u32) -> Self
pub fn new(threads: u32) -> Self
Creates a new ZstdThreads from a u32.
Sourcepub fn all() -> Self
pub fn all() -> Self
Creates a new ZstdThreads which uses all physical CPU cores.
This is short for calling ZstdThreads::new with 0.
Trait Implementations§
Source§impl Clone for ZstdThreads
impl Clone for ZstdThreads
Source§fn clone(&self) -> ZstdThreads
fn clone(&self) -> ZstdThreads
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ZstdThreads
impl Debug for ZstdThreads
Source§impl Default for ZstdThreads
impl Default for ZstdThreads
Source§impl<'de> Deserialize<'de> for ZstdThreads
impl<'de> Deserialize<'de> for ZstdThreads
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ZstdThreads
Source§impl From<&ZstdThreads> for i64
impl From<&ZstdThreads> for i64
Source§fn from(value: &ZstdThreads) -> Self
fn from(value: &ZstdThreads) -> Self
Converts to this type from the input type.
Source§impl From<&ZstdThreads> for i128
impl From<&ZstdThreads> for i128
Source§fn from(value: &ZstdThreads) -> Self
fn from(value: &ZstdThreads) -> Self
Converts to this type from the input type.
Source§impl From<&ZstdThreads> for u64
impl From<&ZstdThreads> for u64
Source§fn from(value: &ZstdThreads) -> Self
fn from(value: &ZstdThreads) -> Self
Converts to this type from the input type.
Source§impl From<&ZstdThreads> for u128
impl From<&ZstdThreads> for u128
Source§fn from(value: &ZstdThreads) -> Self
fn from(value: &ZstdThreads) -> Self
Converts to this type from the input type.
Source§impl Ord for ZstdThreads
impl Ord for ZstdThreads
Source§fn cmp(&self, other: &ZstdThreads) -> Ordering
fn cmp(&self, other: &ZstdThreads) -> Ordering
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
Source§impl PartialEq for ZstdThreads
impl PartialEq for ZstdThreads
Source§fn eq(&self, other: &ZstdThreads) -> bool
fn eq(&self, other: &ZstdThreads) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ZstdThreads
impl PartialOrd for ZstdThreads
Source§impl Serialize for ZstdThreads
impl Serialize for ZstdThreads
impl StructuralPartialEq for ZstdThreads
Auto Trait Implementations§
impl Freeze for ZstdThreads
impl RefUnwindSafe for ZstdThreads
impl Send for ZstdThreads
impl Sync for ZstdThreads
impl Unpin for ZstdThreads
impl UnsafeUnpin for ZstdThreads
impl UnwindSafe for ZstdThreads
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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