Trait ArenaIndex

Source
pub trait ArenaIndex: Copy {
    // Required methods
    fn from_idx(idx: usize) -> Self;
    fn to_idx(self) -> usize;
}
Expand description

A type which can be used as an index to an arena

Required Methods§

Source

fn from_idx(idx: usize) -> Self

Create an arena index from a usize

Source

fn to_idx(self) -> usize

Transform an arena index into a usize

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§