pub struct NonZeroIndex<T: NonZeroAble> { /* private fields */ }
Expand description
An arena index which is always nonzero. Useful for Option
Trait Implementations§
Source§impl<T> ArenaIndex for NonZeroIndex<T>where
T: NonZeroAble + FromPrimitive,
NonZeroIndex<T>: Copy,
<<T as NonZeroAble>::NonZero as NonZero>::Primitive: ToPrimitive,
impl<T> ArenaIndex for NonZeroIndex<T>where
T: NonZeroAble + FromPrimitive,
NonZeroIndex<T>: Copy,
<<T as NonZeroAble>::NonZero as NonZero>::Primitive: ToPrimitive,
Source§impl<T: Clone + NonZeroAble> Clone for NonZeroIndex<T>
impl<T: Clone + NonZeroAble> Clone for NonZeroIndex<T>
Source§fn clone(&self) -> NonZeroIndex<T>
fn clone(&self) -> NonZeroIndex<T>
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<T: Debug + NonZeroAble> Debug for NonZeroIndex<T>
impl<T: Debug + NonZeroAble> Debug for NonZeroIndex<T>
Source§impl<T: Hash + NonZeroAble> Hash for NonZeroIndex<T>
impl<T: Hash + NonZeroAble> Hash for NonZeroIndex<T>
Source§impl<T: Ord + NonZeroAble> Ord for NonZeroIndex<T>
impl<T: Ord + NonZeroAble> Ord for NonZeroIndex<T>
Source§fn cmp(&self, other: &NonZeroIndex<T>) -> Ordering
fn cmp(&self, other: &NonZeroIndex<T>) -> 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<T: PartialEq + NonZeroAble> PartialEq for NonZeroIndex<T>
impl<T: PartialEq + NonZeroAble> PartialEq for NonZeroIndex<T>
Source§impl<T: PartialOrd + NonZeroAble> PartialOrd for NonZeroIndex<T>where
T::NonZero: PartialOrd,
impl<T: PartialOrd + NonZeroAble> PartialOrd for NonZeroIndex<T>where
T::NonZero: PartialOrd,
impl<T: Copy + NonZeroAble> Copy for NonZeroIndex<T>
impl<T: Eq + NonZeroAble> Eq for NonZeroIndex<T>
impl<T: NonZeroAble> StructuralPartialEq for NonZeroIndex<T>
Auto Trait Implementations§
impl<T> Freeze for NonZeroIndex<T>
impl<T> RefUnwindSafe for NonZeroIndex<T>
impl<T> Send for NonZeroIndex<T>
impl<T> Sync for NonZeroIndex<T>
impl<T> Unpin for NonZeroIndex<T>
impl<T> UnwindSafe for NonZeroIndex<T>
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