pub struct InRangeInclusive<A: Unsigned, B>where
B: Sub<A> + Unsigned,
<B as Sub<A>>::Output: Add<B1>,
<<B as Sub<A>>::Output as Add<B1>>::Output: ArrayLength,{ /* private fields */ }Expand description
A usize value that is guaranteed to be in the range A..=B.
Common methods are in the InRangeBounds trait implementation.
Trait Implementations§
Source§impl<A: Clone + Unsigned, B> Clone for InRangeInclusive<A, B>
impl<A: Clone + Unsigned, B> Clone for InRangeInclusive<A, B>
Source§fn clone(&self) -> InRangeInclusive<A, B>
fn clone(&self) -> InRangeInclusive<A, B>
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<A: Unsigned, B> Finite for InRangeInclusive<A, B>
impl<A: Unsigned, B> Finite for InRangeInclusive<A, B>
Source§type INHABITANTS = <InRangeInclusive<A, B> as InRangeBounds>::INHABITANTS
type INHABITANTS = <InRangeInclusive<A, B> as InRangeBounds>::INHABITANTS
The total number of different inhabitants of the type. Read more
Source§impl<A: Unsigned, B> InRangeBounds for InRangeInclusive<A, B>
impl<A: Unsigned, B> InRangeBounds for InRangeInclusive<A, B>
Source§type INHABITANTS = <<B as Sub<A>>::Output as Add<B1>>::Output
type INHABITANTS = <<B as Sub<A>>::Output as Add<B1>>::Output
The number of values representable.
Source§unsafe fn new_unchecked(i: usize) -> Self
unsafe fn new_unchecked(i: usize) -> Self
Creates a value without checking whether the value is in range. This
results in undefined behavior if the value is not in range. Read more
Source§fn new_from_start_offset(offset: usize) -> Option<Self>
fn new_from_start_offset(offset: usize) -> Option<Self>
Same as
InRangeBounds::new(Self::MIN + i).Source§impl<A: Ord + Unsigned, B> Ord for InRangeInclusive<A, B>
impl<A: Ord + Unsigned, B> Ord for InRangeInclusive<A, B>
Source§fn cmp(&self, other: &InRangeInclusive<A, B>) -> Ordering
fn cmp(&self, other: &InRangeInclusive<A, B>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<A: PartialOrd + Unsigned, B> PartialOrd for InRangeInclusive<A, B>
impl<A: PartialOrd + Unsigned, B> PartialOrd for InRangeInclusive<A, B>
impl<A: Copy + Unsigned, B> Copy for InRangeInclusive<A, B>
impl<A: Eq + Unsigned, B> Eq for InRangeInclusive<A, B>
impl<A: Unsigned, B> StructuralPartialEq for InRangeInclusive<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for InRangeInclusive<A, B>
impl<A, B> RefUnwindSafe for InRangeInclusive<A, B>
impl<A, B> Send for InRangeInclusive<A, B>
impl<A, B> Sync for InRangeInclusive<A, B>
impl<A, B> Unpin for InRangeInclusive<A, B>
impl<A, B> UnwindSafe for InRangeInclusive<A, B>
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