ValuesCollection

Trait ValuesCollection 

Source
pub trait ValuesCollection {
    type Key;
    type Value;

    // Required methods
    fn get_mut(&mut self, key: &Self::Key) -> Option<&mut Self::Value>;
    fn get(&self, key: &Self::Key) -> Option<&Self::Value>;
    fn remove(
        &mut self,
        key_to_remove: impl Into<Self::Key>,
    ) -> Option<Self::Value>;
}

Required Associated Types§

Required Methods§

Source

fn get_mut(&mut self, key: &Self::Key) -> Option<&mut Self::Value>

Source

fn get(&self, key: &Self::Key) -> Option<&Self::Value>

Source

fn remove(&mut self, key_to_remove: impl Into<Self::Key>) -> Option<Self::Value>

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 ValuesCollection for Value

Source§

type Value = Value

Source§

type Key = Value

Source§

fn get(&self, key: &Self::Value) -> Option<&Self::Value>

Source§

fn get_mut(&mut self, key: &Self::Value) -> Option<&mut Self::Value>

Source§

fn remove(&mut self, key: impl Into<Self::Key>) -> Option<Self::Value>

Implementors§