pub struct ZstdThreads(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: u32
Implementations§
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 · 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 Ord for ZstdThreads
impl Ord for ZstdThreads
Source§fn cmp(&self, other: &ZstdThreads) -> Ordering
fn cmp(&self, other: &ZstdThreads) -> 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 ZstdThreads
impl PartialEq for ZstdThreads
Source§impl PartialOrd for ZstdThreads
impl PartialOrd for ZstdThreads
impl Eq 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 UnwindSafe for ZstdThreads
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