Skip to main content

SlotKey

Trait SlotKey 

Source
pub(super) trait SlotKey<M> {
    // Required methods
    fn get_offset<'m>(map: &'m M, key: &Self) -> Option<&'m usize>;
    fn insert_offset(map: &mut M, key: Self, value: usize);
}

Required Methods§

Source

fn get_offset<'m>(map: &'m M, key: &Self) -> Option<&'m usize>

Source

fn insert_offset(map: &mut M, key: Self, value: usize)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<S> SlotKey<HashMap<String, usize, S>> for &str
where S: BuildHasher,

Source§

fn get_offset<'m>( map: &'m HashMap<String, usize, S>, key: &Self, ) -> Option<&'m usize>

Source§

fn insert_offset(map: &mut HashMap<String, usize, S>, key: Self, value: usize)

Implementors§

Source§

impl<K, S> SlotKey<HashMap<K, usize, S>> for K
where K: Copy + Eq + Hash, S: BuildHasher,