Trait hash_arr_map::FromIndex [−][src]
pub trait FromIndex: Sized + IntoIndex {
fn from_index(idx: Idx<Self>) -> Self;
}
Expand description
Conversion from an Idx
.
This trait implements conversion from an Idx
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 IntoIndex::into_index
, Idx::try_new
or that it
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
.