[][src]Trait nitric_component::id::Id

pub trait Id: Clone + Debug + Sized {
    type Allocator: Allocator<Self> + ?Sized;
    type Key: Clone + Debug + Hash + Eq + Sized;
    fn try_as_key(
        allocator: &Self::Allocator
    ) -> Result<Cow<Self::Key>, InvalidIdError<Self>>;
fn as_key_unchecked(&self) -> Cow<Self::Key>; }

Top-level trait that all IDs must implement.

Associated Types

The allocator which manages IDs of this type.

The unique key of this ID.

Required Methods

Returns the key if this ID is valid, or an InvalidIdError otherwise.

Returns the inner key without checking whether or not the Id is valid.


impl Id for FlatUsize

impl<'merger, ID> Id for CheckedId<'merger, ID> where
    ID: Id + MergingDeletion + 'merger,