[][src]Trait cranelift_entity::SparseMapValue

pub trait SparseMapValue<K> {
    fn key(&self) -> K;
}

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

fn key(&self) -> K

Get the key of this sparse map value. This key is not allowed to change while the value is a member of the map.

Loading content...

Implementors

impl<T> SparseMapValue<T> for T where
    T: EntityRef
[src]

Any EntityRef can be used as a sparse map value representing itself.

Loading content...