Trait hash_arr_map::FromIndex [−][src]
pub trait FromIndex: Sized + IntoIndex { fn try_from_index(idx: NonZeroUsize) -> Option<Self>; unsafe fn from_index(idx: NonZeroUsize) -> Self { ... } }
Expand description
Conversion from an index.
This trait implements conversion from an index into self.
The indices converted are guaranteed to have been returned from
IntoIndex::into_index
at some point in the past.
Required methods
fn try_from_index(idx: NonZeroUsize) -> Option<Self>
[src]
fn try_from_index(idx: NonZeroUsize) -> Option<Self>
[src]Fallibly convert it.
Provided methods
unsafe fn from_index(idx: NonZeroUsize) -> Self
[src]
unsafe fn from_index(idx: NonZeroUsize) -> Self
[src]Convert it.
Safety
The index must have been returned from IntoIndex::into_index
at some
point in the past.