pub struct ConfigMinTwoUsize(/* private fields */);Expand description
A usize configuration value that rejects 0 and 1 when set from strings.
Use this for options whose consumer divides the value in half to size an
internal buffer (e.g. a bounded channel capacity): values below 2 would
round down to a zero-capacity buffer and panic. Invalid values return a
configuration error through ConfigField instead.
Implementations§
Trait Implementations§
Source§impl Clone for ConfigMinTwoUsize
impl Clone for ConfigMinTwoUsize
Source§fn clone(&self) -> ConfigMinTwoUsize
fn clone(&self) -> ConfigMinTwoUsize
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 ConfigField for ConfigMinTwoUsize
impl ConfigField for ConfigMinTwoUsize
impl Copy for ConfigMinTwoUsize
Source§impl Debug for ConfigMinTwoUsize
impl Debug for ConfigMinTwoUsize
Source§impl Display for ConfigMinTwoUsize
impl Display for ConfigMinTwoUsize
impl Eq for ConfigMinTwoUsize
Source§impl From<ConfigMinTwoUsize> for usize
impl From<ConfigMinTwoUsize> for usize
Source§fn from(value: ConfigMinTwoUsize) -> Self
fn from(value: ConfigMinTwoUsize) -> Self
Converts to this type from the input type.
Source§impl FromStr for ConfigMinTwoUsize
impl FromStr for ConfigMinTwoUsize
Source§impl Hash for ConfigMinTwoUsize
impl Hash for ConfigMinTwoUsize
Source§impl Ord for ConfigMinTwoUsize
impl Ord for ConfigMinTwoUsize
Source§fn cmp(&self, other: &ConfigMinTwoUsize) -> Ordering
fn cmp(&self, other: &ConfigMinTwoUsize) -> 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 ConfigMinTwoUsize
impl PartialEq for ConfigMinTwoUsize
Source§impl PartialOrd for ConfigMinTwoUsize
impl PartialOrd for ConfigMinTwoUsize
impl StructuralPartialEq for ConfigMinTwoUsize
Auto Trait Implementations§
impl Freeze for ConfigMinTwoUsize
impl RefUnwindSafe for ConfigMinTwoUsize
impl Send for ConfigMinTwoUsize
impl Sync for ConfigMinTwoUsize
impl Unpin for ConfigMinTwoUsize
impl UnsafeUnpin for ConfigMinTwoUsize
impl UnwindSafe for ConfigMinTwoUsize
Blanket Implementations§
impl<T> Allocation 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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.