Trait OccupiedEntry

Source
pub trait OccupiedEntry<'a> {
    type K;
    type V;

    // Required methods
    fn key(&self) -> &Self::K;
    fn get(&self) -> &Self::V;
    fn get_mut(&mut self) -> &mut Self::V;
    fn into_mut(self) -> &'a mut Self::V;
    fn insert(&mut self, v: Self::V) -> Self::V;
    fn remove(self) -> Self::V;
}

Required Associated Types§

Source

type K

Source

type V

Required Methods§

Source

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

Source

fn get(&self) -> &Self::V

Source

fn get_mut(&mut self) -> &mut Self::V

Source

fn into_mut(self) -> &'a mut Self::V

Source

fn insert(&mut self, v: Self::V) -> Self::V

Source

fn remove(self) -> Self::V

Implementations on Foreign Types§

Source§

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

Source§

type K = K

Source§

type V = V

Source§

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

Source§

fn get(&self) -> &Self::V

Source§

fn get_mut(&mut self) -> &mut Self::V

Source§

fn into_mut(self) -> &'a mut Self::V

Source§

fn insert(&mut self, v: Self::V) -> Self::V

Source§

fn remove(self) -> Self::V

Source§

impl<'a, K, V> OccupiedEntry<'a> for OccupiedEntry<'a, K, V>

Source§

type K = K

Source§

type V = V

Source§

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

Source§

fn get(&self) -> &Self::V

Source§

fn get_mut(&mut self) -> &mut Self::V

Source§

fn into_mut(self) -> &'a mut Self::V

Source§

fn insert(&mut self, v: Self::V) -> Self::V

Source§

fn remove(self) -> Self::V

Source§

impl<'a, K, V> OccupiedEntry<'a> for OccupiedEntry<'a, K, V>

Source§

type K = K

Source§

type V = V

Source§

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

Source§

fn get(&self) -> &Self::V

Source§

fn get_mut(&mut self) -> &mut Self::V

Source§

fn into_mut(self) -> &'a mut Self::V

Source§

fn insert(&mut self, v: Self::V) -> Self::V

Source§

fn remove(self) -> Self::V

Source§

impl<'a, K, V, H> OccupiedEntry<'a> for OccupiedEntry<'a, K, V, H>
where K: Ord + BorshSerialize + BorshDeserialize + Clone, V: BorshSerialize + BorshDeserialize, H: ToKey,

Source§

type K = K

Source§

type V = V

Source§

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

Source§

fn get(&self) -> &Self::V

Source§

fn get_mut(&mut self) -> &mut Self::V

Source§

fn into_mut(self) -> &'a mut Self::V

Source§

fn insert(&mut self, v: Self::V) -> Self::V

Source§

fn remove(self) -> Self::V

Implementors§