Trait hash_arr_map::FromIndex [−][src]
pub trait FromIndex: Sized + IntoIndex { fn from_index(idx: Idx<Self>) -> Self; }
Expand description
Conversion from an index.
This trait implements conversion from an index into Self
.
Required methods
fn from_index(idx: Idx<Self>) -> Self
fn from_index(idx: Idx<Self>) -> Self
Convert it.
Implementors
The only guarantees about the index value is that it has either
come from Self::into_index
, Idx::try_new
or that is has
come from a borrowed form of Self
.
By implementing Borrow<T>
for your type, this loosens the
guarantees given here, since this index could also come from
T
.