[][src]Trait nitric_component::id::Continuous

pub trait Continuous: Id<Key = usize> { }

A trait that marks an ID as continuous. The following properties are required to hold:

If x is a valid ID, x - 1 is a valid ID unless x == ZERO. allocator.num_valid() - 1 is a valid ID unless self.num_valid() == ZERO.

Memory safety

A storage may not rely on this property for memory safety reasons. Instead, it may panic in case this contract is violated.


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