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

pub trait MergingDeletion: Id {
    type Merger;
    fn checked<'merger>(
        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


impl MergingDeletion for FlatUsize

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