Skip to main content

IGenID

Trait IGenID 

Source
pub trait IGenID<Gen = u32>:
    From<(usize, Gen)>
    + Into<(usize, Gen)>
    + Clone
    + Copy
    + PartialEq
    + Eq
    + Hash
    + Ord
    + PartialOrd
    + Default
where Gen: IGeneration,
{ const NULL: Self; // Required methods fn index(self) -> usize; fn generation(self) -> Gen; // Provided methods fn from_index_and_generation(index: usize, generation: Gen) -> Self { ... } fn index_and_generation(self) -> (usize, Gen) { ... } fn is_null(self) -> bool { ... } fn is_not_null(self) -> bool { ... } fn reset(&mut self) { ... } fn typed<T>(self) -> GenIDOf<T, Gen> { ... } fn untyped(self) -> UntypedGenIDOf<Gen> { ... } }

Required Associated Constants§

Source

const NULL: Self

Required Methods§

Source

fn index(self) -> usize

Source

fn generation(self) -> Gen

Provided Methods§

Source

fn from_index_and_generation(index: usize, generation: Gen) -> Self

Source

fn index_and_generation(self) -> (usize, Gen)

Source

fn is_null(self) -> bool

Source

fn is_not_null(self) -> bool

Source

fn reset(&mut self)

Set the value to Self::NULL

Source

fn typed<T>(self) -> GenIDOf<T, Gen>

Source

fn untyped(self) -> UntypedGenIDOf<Gen>

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§

Source§

impl<Gen> IGenID<Gen> for UntypedGenIDOf<Gen>
where Gen: IGeneration,

Source§

impl<T, Gen> IGenID<Gen> for GenIDOf<T, Gen>
where Gen: IGeneration,

Source§

const NULL: GenIDOf<T, Gen>