Skip to main content

Identifier

Trait Identifier 

Source
pub trait Identifier:
    Eq
    + Debug
    + Copy
    + Send
    + Sync {
    type AtomicType: RollingCounter<NonAtomic = Self>;
    type ComparisonMaySpuriouslyEq: Boolean;
}
Expand description

A trait for types that can serve as unique identifiers for runtime tokens.

An Identifier must be able to be represented by an atomic type that can be incremented to produce the next identifier.

Required Associated Types§

Source

type AtomicType: RollingCounter<NonAtomic = Self>

The atomic counterpart to this identifier type.

Source

type ComparisonMaySpuriouslyEq: Boolean

Whether or not comparison between two distinct token could yield eq.

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 Identifier for u8

Source§

impl Identifier for u16

Source§

impl Identifier for u32

Source§

impl Identifier for u64

Source§

impl Identifier for u128

Implementors§