pub struct NonMaxUsize(/* private fields */);
Implementations§
Source§impl NonMaxUsize
impl NonMaxUsize
pub const ZERO: Self
pub const ONE: Self
pub const MAX: Self
pub const fn new(value: usize) -> Option<Self>
Sourcepub const unsafe fn new_unchecked(value: usize) -> Self
pub const unsafe fn new_unchecked(value: usize) -> Self
Creates a new non-max without checking the value.
§Safety
The value must not equal the maximum representable value for the primitive type.
pub const fn get(self) -> usize
Methods from Deref<Target = NonMaxUsize>§
Trait Implementations§
Source§impl Clone for NonMaxUsizewhere
NonMaxUsize: Clone,
impl Clone for NonMaxUsizewhere
NonMaxUsize: Clone,
Source§impl Debug for NonMaxUsizewhere
NonMaxUsize: Debug,
impl Debug for NonMaxUsizewhere
NonMaxUsize: Debug,
Source§impl Default for NonMaxUsize
impl Default for NonMaxUsize
Source§fn default() -> NonMaxUsize
fn default() -> NonMaxUsize
Returns the “default value” for a type. Read more
Source§impl Deref for NonMaxUsize
impl Deref for NonMaxUsize
Source§impl DerefMut for NonMaxUsize
impl DerefMut for NonMaxUsize
Source§impl Display for NonMaxUsize
impl Display for NonMaxUsize
Source§impl From<NonMaxUsize> for NonMaxUsize
impl From<NonMaxUsize> for NonMaxUsize
Source§fn from(inner: NonMaxUsize) -> Self
fn from(inner: NonMaxUsize) -> Self
Converts to this type from the input type.
Source§impl FromStr for NonMaxUsize
impl FromStr for NonMaxUsize
Source§impl Hash for NonMaxUsize
impl Hash for NonMaxUsize
Source§impl Ord for NonMaxUsize
impl Ord for NonMaxUsize
Source§fn cmp(&self, other: &NonMaxUsize) -> Ordering
fn cmp(&self, other: &NonMaxUsize) -> 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 NonMaxUsize
impl PartialEq for NonMaxUsize
Source§impl PartialOrd for NonMaxUsize
impl PartialOrd for NonMaxUsize
impl Copy for NonMaxUsize
impl Eq for NonMaxUsize
impl StructuralPartialEq for NonMaxUsize
Auto Trait Implementations§
impl Freeze for NonMaxUsize
impl RefUnwindSafe for NonMaxUsize
impl Send for NonMaxUsize
impl Sync for NonMaxUsize
impl Unpin for NonMaxUsize
impl UnwindSafe for NonMaxUsize
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§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§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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more