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