pub trait Map<K, V>: Container { fn find<'a>(&'a self, key: &K) -> Option<&'a V>; fn contains_key(&self, key: &K) -> bool { ... } }
A map is a key-value store where values may be looked up by their keys. This trait provides basic operations to operate on these stores.
fn find<'a>(&'a self, key: &K) -> Option<&'a V>
Return a reference to the value corresponding to the key
fn contains_key(&self, key: &K) -> bool
Return true if the map contains a value for the specified key
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).