Trait HashmapCustom

Source
pub trait HashmapCustom {
    // Required methods
    fn get_value<T>(&self, key: &str) -> Option<T>
       where T: Copy + 'static,
             MapValue: MapValueExtractor<T>;
    fn get_value_ref<T>(&self, key: &str) -> Option<&T>
       where MapValue: MapValueExtractor<T>;
    fn set_value<T>(&mut self, key: &str, value: T)
       where T: Into<MapValue>;
}

Required Methods§

Source

fn get_value<T>(&self, key: &str) -> Option<T>
where T: Copy + 'static, MapValue: MapValueExtractor<T>,

Source

fn get_value_ref<T>(&self, key: &str) -> Option<&T>
where MapValue: MapValueExtractor<T>,

Source

fn set_value<T>(&mut self, key: &str, value: T)
where T: Into<MapValue>,

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 HashmapCustom for HashMap<String, MapValue>

Source§

fn get_value<T>(&self, key: &str) -> Option<T>
where T: Copy + 'static, MapValue: MapValueExtractor<T>,

Source§

fn get_value_ref<T>(&self, key: &str) -> Option<&T>
where MapValue: MapValueExtractor<T>,

Source§

fn set_value<T>(&mut self, key: &str, value: T)
where T: Into<MapValue>,

Implementors§