[][src]Struct generational_arena::Index

pub struct Index { /* fields omitted */ }

An index (and generation) into an Arena.

To get an Index, insert an element into an Arena, and the Index for that element will be returned.

Examples

use generational_arena::Arena;

let mut arena = Arena::new();
let idx = arena.insert(123);
assert_eq!(arena[idx], 123);

Trait Implementations

impl Debug for Index[src]

impl PartialEq<Index> for Index[src]

impl Eq for Index[src]

impl Ord for Index[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialOrd<Index> for Index[src]

impl Hash for Index[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Copy for Index[src]

impl<T> Index<Index> for Arena<T>[src]

type Output = T

The returned type after indexing.

impl<T> IndexMut<Index> for Arena<T>[src]

impl Clone for Index[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Index

impl Sync for Index

Blanket Implementations

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T