pub trait SparseMapValue<K> {
// Required method
fn key(&self) -> K;
}Expand description
Trait for extracting keys from values stored in a SparseMap.
All values stored in a SparseMap must keep track of their own key in the map and implement
this trait to provide access to the key.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<T> SparseMapValue<T> for Twhere
T: EntityRef,
Any EntityRef can be used as a sparse map value representing itself.