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 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)
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.
Trait Implementations§
Source§impl Binary for NonMaxI128
impl Binary for NonMaxI128
Source§impl BitAnd for NonMaxI128
impl BitAnd for NonMaxI128
Source§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§impl PartialOrd for NonMaxI128
impl PartialOrd for NonMaxI128
Source§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
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
)