Struct hash_arr_map::Idx [−][src]
pub struct Idx<T: ?Sized> { /* fields omitted */ }
Expand description
A value represented as an index.
Valid indices
Valid indices are defined by the type T
. In order for an index
to be valid, they must be valid to be passed into
FromIndex::from_index
.
Created by either IntoIndex::into_index
or Idx::try_new
.
Implementations
Create a new index with the specified value if the type allows it.
Same as Self::new
, except that v
can be zero, and
None
will be returned.
Safety
The value must either be a valid index or zero.
Convert this index into a value.
A shorthand for <T as FromIndex>::from_index(self)
.
Trait Implementations
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for Idx<T> where
T: RefUnwindSafe,
impl<T: ?Sized> UnwindSafe for Idx<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more