Struct serde_yaml::mapping::Mapping [−][src]
pub struct Mapping { /* fields omitted */ }
Expand description
A YAML mapping in which the keys and values are both serde_yaml::Value
.
Implementations
Creates an empty YAML map with the given initial capacity.
Reserves capacity for at least additional
more elements to be inserted
into the map. The map may reserve more space to avoid frequent
allocations.
Panics
Panics if the new allocation size overflows usize
.
Shrinks the capacity of the map as much as possible. It will drop down as much as possible while maintaining the internal rules and possibly leaving some space in accordance with the resize policy.
Inserts a key-value pair into the map. If the key already existed, the old value is returned.
Checks if the map contains the given key.
Returns the value corresponding to the key in the map.
Returns the mutable reference corresponding to the key in the map.
Removes and returns the value corresponding to the key from the map.
Returns the maximum number of key-value pairs the map can hold without reallocating.
Returns a double-ended iterator visiting all key-value pairs in order of
insertion. Iterator element type is (&'a Value, &'a Value)
.
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
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Mapping
impl UnwindSafe for Mapping
Blanket Implementations
Mutably borrows from an owned value. Read more