[][src]Trait nitric_component::id::MergingDeletion

pub trait MergingDeletion: Id {
    type Merger;
    fn checked<'merger>(
        self,
        allocator: &Self::Allocator,
        merger: &'merger Self::Merger
    ) -> Result<CheckedId<'merger, Self>, InvalidIdError<Self>> { ... } }

An ID that will only turn invalid when merged.

Associated Types

The merger for this ID. You should make sure that the merger cannot be duplicated. It's usually a good idea to use nitric_component::allocator::Merger for this.

Provided Methods

Checks if this ID is valid and returns a CheckedId which implements ValidId, or an error in case self is invalid.

This is useful if

  • a function requires the ValidId trait and your ID may be invalid
  • you need to pass your ID to several functions

Implementors

impl MergingDeletion for FlatUsize
[src]

impl<T> MergingDeletion for T where
    T: WrapperId,
    T::Original: Id<Key = T::Key> + MergingDeletion
[src]