MappedTrait

Trait MappedTrait 

Source
pub trait MappedTrait<K, V>: Sync + Send
where K: Clone + Sync + Send + Eq + Hash, V: Clone + Sync + Send,
{ // Required methods fn for_each(&self, action: &dyn Fn(K, V)); fn get(&self, key: K) -> Result<V>; fn get_or(&self, key: K, fallback: V) -> V; fn has(&self, key: K) -> bool; fn keys(&self) -> Listed<K>; fn len(&self) -> i32; fn to_list(&self) -> List<(K, V)>; fn to_map(&self) -> Map<K, V>; fn to_map_builder(&self) -> MapBuilder<K, V>; fn values(&self) -> Listed<V>; }

Required Methods§

Source

fn for_each(&self, action: &dyn Fn(K, V))

Source

fn get(&self, key: K) -> Result<V>

Source

fn get_or(&self, key: K, fallback: V) -> V

Source

fn has(&self, key: K) -> bool

Source

fn keys(&self) -> Listed<K>

Source

fn len(&self) -> i32

Source

fn to_list(&self) -> List<(K, V)>

Source

fn to_map(&self) -> Map<K, V>

Source

fn to_map_builder(&self) -> MapBuilder<K, V>

Source

fn values(&self) -> Listed<V>

Implementors§

Source§

impl<K, V> MappedTrait<K, V> for Map<K, V>
where K: 'static + Clone + Sync + Send + Eq + Hash, V: 'static + Clone + Sync + Send,

Source§

impl<K, V> MappedTrait<K, V> for MapBuilder<K, V>
where K: 'static + Clone + Sync + Send + Eq + Hash, V: 'static + Clone + Sync + Send,