ArenaId

Trait ArenaId 

Source
pub trait ArenaId {
    // Required methods
    fn from_usize(x: usize) -> Self;
    fn to_usize(self) -> usize;
}
Expand description

A trait indicating that the type can be transformed to usize and back

Required Methods§

Source

fn from_usize(x: usize) -> Self

Constructs a new Id from an index.

Source

fn to_usize(self) -> usize

Returns the index of the Id.

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§