Struct nonmax::NonMaxUsize
source · [−]#[repr(transparent)]pub struct NonMaxUsize(_);
Expand description
An integer that is known not to equal its maximum value.
Implementations
sourceimpl NonMaxUsize
impl NonMaxUsize
sourcepub const fn new(value: usize) -> Option<Self>
pub const fn new(value: usize) -> Option<Self>
Creates a new non-max if the given value is not the maximum value.
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.
Trait Implementations
sourceimpl Binary for NonMaxUsize
impl Binary for NonMaxUsize
sourceimpl BitAnd<NonMaxUsize> for NonMaxUsize
impl BitAnd<NonMaxUsize> for NonMaxUsize
type Output = NonMaxUsize
type Output = NonMaxUsize
The resulting type after applying the &
operator.
sourcefn bitand(self, rhs: NonMaxUsize) -> Self::Output
fn bitand(self, rhs: NonMaxUsize) -> Self::Output
Performs the &
operation. Read more
sourceimpl BitAnd<NonMaxUsize> for usize
impl BitAnd<NonMaxUsize> for usize
type Output = NonMaxUsize
type Output = NonMaxUsize
The resulting type after applying the &
operator.
sourcefn bitand(self, rhs: NonMaxUsize) -> Self::Output
fn bitand(self, rhs: NonMaxUsize) -> Self::Output
Performs the &
operation. Read more
sourceimpl BitAnd<usize> for NonMaxUsize
impl BitAnd<usize> for NonMaxUsize
sourceimpl BitAndAssign<NonMaxUsize> for NonMaxUsize
impl BitAndAssign<NonMaxUsize> for NonMaxUsize
sourcefn bitand_assign(&mut self, rhs: NonMaxUsize)
fn bitand_assign(&mut self, rhs: NonMaxUsize)
Performs the &=
operation. Read more
sourceimpl BitAndAssign<NonMaxUsize> for usize
impl BitAndAssign<NonMaxUsize> for usize
sourcefn bitand_assign(&mut self, rhs: NonMaxUsize)
fn bitand_assign(&mut self, rhs: NonMaxUsize)
Performs the &=
operation. Read more
sourceimpl BitAndAssign<usize> for NonMaxUsize
impl BitAndAssign<usize> for NonMaxUsize
sourcefn bitand_assign(&mut self, rhs: usize)
fn bitand_assign(&mut self, rhs: usize)
Performs the &=
operation. Read more
sourceimpl Clone for NonMaxUsize
impl Clone for NonMaxUsize
sourcefn clone(&self) -> NonMaxUsize
fn clone(&self) -> NonMaxUsize
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for NonMaxUsize
impl Debug for NonMaxUsize
sourceimpl Default for NonMaxUsize
impl Default for NonMaxUsize
sourceimpl Display for NonMaxUsize
impl Display for NonMaxUsize
sourceimpl From<NonMaxU16> for NonMaxUsize
impl From<NonMaxU16> for NonMaxUsize
sourceimpl From<NonMaxU8> for NonMaxUsize
impl From<NonMaxU8> for NonMaxUsize
sourceimpl From<NonMaxUsize> for usize
impl From<NonMaxUsize> for usize
sourcefn from(value: NonMaxUsize) -> Self
fn from(value: NonMaxUsize) -> Self
Converts to this type from the input type.
sourceimpl From<u16> for NonMaxUsize
impl From<u16> for NonMaxUsize
sourceimpl From<u8> for NonMaxUsize
impl From<u8> for NonMaxUsize
sourceimpl FromStr for NonMaxUsize
impl FromStr for NonMaxUsize
sourceimpl Hash for NonMaxUsize
impl Hash for NonMaxUsize
sourceimpl LowerHex for NonMaxUsize
impl LowerHex for NonMaxUsize
sourceimpl Octal for NonMaxUsize
impl Octal for NonMaxUsize
sourceimpl Ord for NonMaxUsize
impl Ord for NonMaxUsize
sourceimpl PartialEq<NonMaxUsize> for NonMaxUsize
impl PartialEq<NonMaxUsize> for NonMaxUsize
sourcefn eq(&self, other: &NonMaxUsize) -> bool
fn eq(&self, other: &NonMaxUsize) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &NonMaxUsize) -> bool
fn ne(&self, other: &NonMaxUsize) -> bool
This method tests for !=
.
sourceimpl PartialOrd<NonMaxUsize> for NonMaxUsize
impl PartialOrd<NonMaxUsize> for NonMaxUsize
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl TryFrom<usize> for NonMaxUsize
impl TryFrom<usize> for NonMaxUsize
sourceimpl UpperHex for NonMaxUsize
impl UpperHex for NonMaxUsize
impl Copy for NonMaxUsize
impl Eq for NonMaxUsize
impl StructuralEq for NonMaxUsize
impl StructuralPartialEq for NonMaxUsize
Auto Trait Implementations
impl RefUnwindSafe for NonMaxUsize
impl Send for NonMaxUsize
impl Sync for NonMaxUsize
impl Unpin for NonMaxUsize
impl UnwindSafe for NonMaxUsize
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more