Struct toml::map::Map [−][src]
pub struct Map<K, V> { /* fields omitted */ }
Expand description
Represents a TOML key/value type.
Implementations
Makes a new empty Map with the given initial capacity.
Returns a reference to the value corresponding to the key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
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, but the ordering on the borrowed form must match the ordering on the key type.
Returns a mutable reference to the value corresponding to the key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
Inserts a key-value pair into the map.
If the map did not have this key present, None
is returned.
If the map did have this key present, the value is updated, and the old
value is returned. The key is not updated, though; this matters for
types that can be ==
without being identical.
Removes a key from the map, returning the value at the key if the key was previously in the map.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
Gets the given key’s corresponding entry in the map for in-place manipulation.
Gets an iterator over the entries of the map.
Gets a mutable iterator over the entries of the map.
Gets an iterator over the keys of the map.
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
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
Access an element of this map. Panics if the given key is not present in the map.
Mutably access an element of this map. Panics if the given key is not present in the map.
Auto Trait Implementations
impl<K, V> RefUnwindSafe for Map<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> UnwindSafe for Map<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more