Id

Trait Id 

Source
pub trait Id {
    // Required methods
    fn from_usize(val: usize) -> Self;
    fn as_usize(&self) -> usize;
}
Expand description

Generic identifier trait.

Required Methods§

Source

fn from_usize(val: usize) -> Self

Creates an identifier from a usize.

Source

fn as_usize(&self) -> usize

Returns the identifier as 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§