Struct rustc_data_structures::vec_map::VecMap [−][src]
Expand description
A map type implemented as a vector of pairs K
(key) and V
(value).
It currently provides a subset of all the map operations, the rest could be added as needed.
Tuple Fields
0: Vec<(K, V)>
Implementations
Sets the value of the entry, and returns the entry’s old value.
Gets a reference to the value in the entry.
Returns the any value corresponding to the supplied predicate filter.
The supplied predicate will be applied to each (key, value) pair and it will return a
reference to the values where the predicate returns true
.
Returns the value corresponding to the supplied predicate filter. It crashes if there’s more than one matching element.
The supplied predicate will be applied to each (key, value) pair and it will return a
reference to the value where the predicate returns true
.
Returns true
if the map contains a value for the specified key.
The key may be any borrowed form of the map’s key type,
Eq
on the borrowed form must match those for
the key type.
Trait Implementations
Extends a collection with the contents of an iterator. Read more
extend_one
)Extends a collection with exactly one element.
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
impl<K, V, CTX> HashStable<CTX> for VecMap<K, V> where
K: HashStable<CTX> + Eq,
V: HashStable<CTX>,
impl<K, V, CTX> HashStable<CTX> for VecMap<K, V> where
K: HashStable<CTX> + Eq,
V: HashStable<CTX>,
Auto Trait Implementations
impl<K, V> RefUnwindSafe for VecMap<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> UnwindSafe for VecMap<K, V> where
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes