An index (and generation) into an
To get an
Index, insert an element into an
Arena, and the
that element will be returned.
use generational_arena::Arena; let mut arena = Arena::new(); let idx = arena.insert(123); assert_eq!(arena[idx], 123);
pub fn from_raw_parts(a: usize, b: u64) -> Index[src]
Create a new
Index from its raw parts.
The parts must have been returned from an earlier call to
Providing arbitrary values will lead to malformed indices and ultimately panics.
Index into its raw parts.
This niche method is useful for converting an
Index into another
identifier type. Usually, you should prefer a newtype wrapper around
pub struct MyIdentifier(Index);. However, for external
types whose definition you can't customize, but which you can construct
instances of, this method can be useful.
fn hash_slice<H>(data: &[Self], state: &mut H) where1.3.0[src]
type Output = T
The returned type after indexing.
impl PartialOrd<Index> for Index[src]
fn partial_cmp(&self, other: &Index) -> Option<Ordering>[src]
impl StructuralEq for Index[src]
impl StructuralPartialEq for Index[src]
impl RefUnwindSafe for Index
impl UnwindSafe for Index
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)[src]
type Error = Infallible
The type returned in the event of a conversion error.