pub enum UIntPlusOne<T>where
T: UInt,{
UInt(T),
MaxPlusOne,
}Expand description
Represents values from 0 to u128::MAX + 1 (inclusive).
Needed to represent every possible length of a RangeInclusive<i128> and RangeInclusive<u128>.
Variants§
UInt(T)
A variant representing an unsigned integer of type T.
MaxPlusOne
A variant representing the value u128::MAX + 1.
Implementations§
Source§impl<T> UIntPlusOne<T>where
T: UInt,
impl<T> UIntPlusOne<T>where
T: UInt,
Sourcepub fn max_plus_one_as_f64() -> f64
pub fn max_plus_one_as_f64() -> f64
Returns the maximum value of an unsigned integer type T plus one, as an f64.
Trait Implementations§
Source§impl<T> Add for UIntPlusOne<T>where
T: UInt,
impl<T> Add for UIntPlusOne<T>where
T: UInt,
Source§impl<T> AddAssign for UIntPlusOne<T>where
T: UInt,
impl<T> AddAssign for UIntPlusOne<T>where
T: UInt,
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl<T> Clone for UIntPlusOne<T>where
T: UInt + Clone,
impl<T> Clone for UIntPlusOne<T>where
T: UInt + Clone,
Source§fn clone(&self) -> UIntPlusOne<T>
fn clone(&self) -> UIntPlusOne<T>
Returns a duplicate 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<T> Debug for UIntPlusOne<T>where
T: UInt + Debug,
impl<T> Debug for UIntPlusOne<T>where
T: UInt + Debug,
Source§impl<T> Display for UIntPlusOne<T>where
T: UInt + Display,
impl<T> Display for UIntPlusOne<T>where
T: UInt + Display,
Source§impl<T> Hash for UIntPlusOne<T>where
T: UInt + Hash,
impl<T> Hash for UIntPlusOne<T>where
T: UInt + Hash,
Source§impl<T> Mul for UIntPlusOne<T>where
T: UInt,
impl<T> Mul for UIntPlusOne<T>where
T: UInt,
Source§impl<T> One for UIntPlusOne<T>where
T: UInt,
impl<T> One for UIntPlusOne<T>where
T: UInt,
Source§impl<T> PartialEq for UIntPlusOne<T>where
T: UInt + PartialEq,
impl<T> PartialEq for UIntPlusOne<T>where
T: UInt + PartialEq,
Source§impl<T> PartialOrd for UIntPlusOne<T>where
T: UInt,
impl<T> PartialOrd for UIntPlusOne<T>where
T: UInt,
Source§impl<T> SubAssign for UIntPlusOne<T>where
T: UInt,
impl<T> SubAssign for UIntPlusOne<T>where
T: UInt,
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreSource§impl<T> Zero for UIntPlusOne<T>where
T: UInt,
impl<T> Zero for UIntPlusOne<T>where
T: UInt,
impl<T> Copy for UIntPlusOne<T>where
T: UInt + Copy,
impl<T> Eq for UIntPlusOne<T>where
T: UInt + Eq,
impl<T> StructuralPartialEq for UIntPlusOne<T>where
T: UInt,
Auto Trait Implementations§
impl<T> Freeze for UIntPlusOne<T>where
T: Freeze,
impl<T> RefUnwindSafe for UIntPlusOne<T>where
T: RefUnwindSafe,
impl<T> Send for UIntPlusOne<T>where
T: Send,
impl<T> Sync for UIntPlusOne<T>where
T: Sync,
impl<T> Unpin for UIntPlusOne<T>where
T: Unpin,
impl<T> UnwindSafe for UIntPlusOne<T>where
T: UnwindSafe,
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more