Entry

Trait Entry 

Source
pub trait Entry<'a> {
    type Key;
    type Value;

    // Required methods
    fn key(&self) -> &Self::Key;
    fn or_insert(self, default: Self::Value) -> &'a mut Self::Value;
}

Required Associated Types§

Required Methods§

Source

fn key(&self) -> &Self::Key

Source

fn or_insert(self, default: Self::Value) -> &'a mut Self::Value

Implementations on Foreign Types§

Source§

impl<'a, K, V> Entry<'a> for Entry<'a, K, V>
where K: Ord,

Source§

type Key = K

Source§

type Value = V

Source§

fn key(&self) -> &Self::Key

Source§

fn or_insert(self, default: Self::Value) -> &'a mut Self::Value

Source§

impl<'a, K, V> Entry<'a> for Entry<'a, K, V>
where K: Eq + Hash,

Source§

type Key = K

Source§

type Value = V

Source§

fn key(&self) -> &Self::Key

Source§

fn or_insert(self, default: Self::Value) -> &'a mut Self::Value

Implementors§