pub trait IntegerIdContiguous: IntegerId { }Expand description
Indicates that an id occupies contiguous range of contiguous values,
and all values between IntegerId::MIN_ID and IntegerId::MAX_ID are valid.
This is similar to bytemuck::Contiguous.
However, since it is safe to implement,
it must not be relied upon for correctness.
§Safety
This trait is safe to implement, so may not usually be relied upon for memory safety.
However, if Self::from_int_unchecked makes unsafe assumptions (satisfying the condition set forth in the IntegerId safety docs),
then this trait must also be implemented correctly.
More specifically, all integers between IntegerId::MIN_ID and IntegerId::MAX_ID must be valid
and cannot fail when passed to IntegerId::from_int_checked.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".