pub trait EquivalentId<K: IntegerId> {
// Required method
fn as_id(&self) -> K;
}Expand description
A type that can be for lookup as an IntegerId.
Used for key lookup in maps, similar to core::borrow::Borrow or equivalent::Equivalent.
These traits are not suitable for id maps,
which need conversion to integers rather than hashing/equality.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".