pub trait Value<'map, 'elem: 'map>: Sized {
// Required methods
fn get_from_map(map: &'map Map<'elem>, key: &str) -> Result<Self>;
fn get_iter_from_map(
map: &'map Map<'elem>,
key: &str,
) -> Result<ValueIter<'map, 'elem, Self>>;
fn store_in_map(
map: &'map mut Map<'elem>,
key: &str,
x: &Self,
) -> Result<()>;
fn append_to_map(
map: &'map mut Map<'elem>,
key: &str,
x: &Self,
) -> Result<()>;
}Expand description
A trait for values which can be stored in a map.
Required Methods§
Sourcefn get_from_map(map: &'map Map<'elem>, key: &str) -> Result<Self>
fn get_from_map(map: &'map Map<'elem>, key: &str) -> Result<Self>
Retrieves the value from the map.
Sourcefn get_iter_from_map(
map: &'map Map<'elem>,
key: &str,
) -> Result<ValueIter<'map, 'elem, Self>>
fn get_iter_from_map( map: &'map Map<'elem>, key: &str, ) -> Result<ValueIter<'map, 'elem, Self>>
Retrieves an iterator over the values from the map.
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.