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 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)
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.
Trait Implementations§
Source§impl Binary for NonMaxIsize
impl Binary for NonMaxIsize
Source§impl BitAnd for NonMaxIsize
impl BitAnd for NonMaxIsize
Source§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§impl PartialOrd for NonMaxIsize
impl PartialOrd for NonMaxIsize
Source§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 StructuralPartialEq for NonMaxIsize
Auto Trait Implementations§
impl Freeze for NonMaxIsize
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)