SymbolId

Trait SymbolId 

Source
pub trait SymbolId:
    Copy
    + Clone
    + Debug
    + Default
    + Eq
    + Hash
    + Ord
    + PartialEq
    + PartialOrd
    + Send
    + Sync {
    // Required methods
    fn next(&self) -> Self;
    fn as_usize(&self) -> usize;
}
Expand description

An atomic ID.

Required Methods§

Source

fn next(&self) -> Self

Returns the ID immediately subsequent to this one.

Source

fn as_usize(&self) -> usize

Casts the ID to 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.

Implementations on Foreign Types§

Source§

impl SymbolId for u8

Source§

fn next(&self) -> Self

Source§

fn as_usize(&self) -> usize

Source§

impl SymbolId for u16

Source§

fn next(&self) -> Self

Source§

fn as_usize(&self) -> usize

Source§

impl SymbolId for u32

Source§

fn next(&self) -> Self

Source§

fn as_usize(&self) -> usize

Source§

impl SymbolId for u64

Source§

fn next(&self) -> Self

Source§

fn as_usize(&self) -> usize

Source§

impl SymbolId for usize

Source§

fn next(&self) -> Self

Source§

fn as_usize(&self) -> usize

Implementors§