Struct representing a dynamic anonymous object.
Rust Examples
use String;
let mut object = new;
assert!;
object.insert_value .into_result?;
object.insert_value .into_result?;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
Methods
Construct a new object with the given capacity.
Examples
let object = with_capacity;
object.insert;
Returns the number of elements in the object.
Examples
let object = with_capacity;
object.insert;
assert_eq!;
Returns true
if the object is empty.
Examples
let object = with_capacity;
assert!;
object.insert;
assert!;
Inserts a key-value pair into the map.
If the map did not have this key present, None
is returned.
Examples
let map = #;
assert_eq!;
assert_eq!;
map.insert;
assert_eq!;
assert_eq!;
Removes a key from the map, returning the value at the key if the key was previously in the map.
Examples
let object = #;
assert_eq!;
assert_eq!;
Clears the object, removing all key-value pairs. Keeps the allocated memory for reuse.
Returns true
if the map contains a value for the specified key.
Examples
let object = #;
assert!;
Returns a reference to the value corresponding to the key.
Examples
let object = #;
assert_eq!;
assert_eq!;
An iterator visiting all keys and values in arbitrary order.
Examples
let object = #;
let vec = ;
for key in object.iter
vec.sort_by;
assert_eq!;
An iterator visiting all keys in arbitrary order.
Examples
let object = #;
let vec = ;
for key in object.keys
vec.sort;
assert_eq!;
An iterator visiting all values in arbitrary order.
Examples
let object = #;
let vec = ;
for key in object.values
vec.sort;
assert_eq!;
Protocols
for item in value
Allows the value to be converted into an iterator in a for-loop.