Struct nonmax::NonMaxIsize
source · pub struct NonMaxIsize(/* private fields */);
Expand description
An integer that is known not to equal its maximum value.
Implementations§
source§impl NonMaxIsize
impl NonMaxIsize
sourcepub const fn new(value: isize) -> Option<Self>
pub const fn new(value: isize) -> Option<Self>
Creates a new non-max if the given value is not the maximum value.
sourcepub const unsafe fn new_unchecked(value: isize) -> Self
pub const unsafe fn new_unchecked(value: isize) -> Self
Creates a new non-max without checking the value.
Safety
The value must not equal the maximum representable value for the primitive type.
sourcepub const ZERO: NonMaxIsize = _
pub const ZERO: NonMaxIsize = _
Gets non-max with the value zero (0)
sourcepub const ONE: NonMaxIsize = _
pub const ONE: NonMaxIsize = _
Gets non-max with the value one (1)
sourcepub const MAX: NonMaxIsize = _
pub const MAX: NonMaxIsize = _
Gets non-max with maximum possible value (which is maximum of the underlying primitive minus one)
Trait Implementations§
source§impl Binary for NonMaxIsize
impl Binary for NonMaxIsize
source§impl BitAnd for NonMaxIsize
impl BitAnd for NonMaxIsize
§type Output = NonMaxIsize
type Output = NonMaxIsize
The resulting type after applying the
&
operator.source§impl BitAndAssign for NonMaxIsize
impl BitAndAssign for NonMaxIsize
source§fn bitand_assign(&mut self, rhs: NonMaxIsize)
fn bitand_assign(&mut self, rhs: NonMaxIsize)
Performs the
&=
operation. Read moresource§impl Clone for NonMaxIsize
impl Clone for NonMaxIsize
source§fn clone(&self) -> NonMaxIsize
fn clone(&self) -> NonMaxIsize
Returns a copy 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 NonMaxIsize
impl Debug for NonMaxIsize
source§impl Default for NonMaxIsize
impl Default for NonMaxIsize
source§impl Display for NonMaxIsize
impl Display for NonMaxIsize
source§impl From<NonMaxI16> for NonMaxIsize
impl From<NonMaxI16> for NonMaxIsize
source§impl From<NonMaxI8> for NonMaxIsize
impl From<NonMaxI8> for NonMaxIsize
source§impl From<NonMaxIsize> for isize
impl From<NonMaxIsize> for isize
source§fn from(value: NonMaxIsize) -> Self
fn from(value: NonMaxIsize) -> Self
Converts to this type from the input type.
source§impl From<NonMaxU8> for NonMaxIsize
impl From<NonMaxU8> for NonMaxIsize
source§impl From<i16> for NonMaxIsize
impl From<i16> for NonMaxIsize
source§impl From<i8> for NonMaxIsize
impl From<i8> for NonMaxIsize
source§impl From<u8> for NonMaxIsize
impl From<u8> for NonMaxIsize
source§impl FromStr for NonMaxIsize
impl FromStr for NonMaxIsize
source§impl Hash for NonMaxIsize
impl Hash for NonMaxIsize
source§impl LowerHex for NonMaxIsize
impl LowerHex for NonMaxIsize
source§impl Octal for NonMaxIsize
impl Octal for NonMaxIsize
source§impl Ord for NonMaxIsize
impl Ord for NonMaxIsize
source§impl PartialEq for NonMaxIsize
impl PartialEq for NonMaxIsize
source§fn eq(&self, other: &NonMaxIsize) -> bool
fn eq(&self, other: &NonMaxIsize) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for NonMaxIsize
impl PartialOrd for NonMaxIsize
1.0.0 · source§fn 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 moresource§impl TryFrom<isize> for NonMaxIsize
impl TryFrom<isize> for NonMaxIsize
source§impl UpperHex for NonMaxIsize
impl UpperHex for NonMaxIsize
impl Copy for NonMaxIsize
impl Eq for NonMaxIsize
impl StructuralEq for NonMaxIsize
impl StructuralPartialEq for NonMaxIsize
Auto Trait Implementations§
impl RefUnwindSafe for NonMaxIsize
impl Send for NonMaxIsize
impl Sync for NonMaxIsize
impl Unpin for NonMaxIsize
impl UnwindSafe for NonMaxIsize
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