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_by;
assert_eq!;
An iterator visiting all values in arbitrary order.
Examples
let object = #;
let vec = ;
for key in object.values
vec.sort_by;
assert_eq!;
Trait Implementations
Compare two values for equality.
Examples
assert_eq!;
assert_eq!;
assert_eq!;
Compare two values for inequality.
Examples
assert_eq!;
assert_eq!;
assert_eq!;
Clone the specified value
.
Examples
let a = 42;
let b = a;
let c = a.clone;
a += 1;
assert_eq!;
assert_eq!;
assert_eq!;
Protocols
if value == b
Test two objects for partial equality.
Examples
let a = #;
let b = #;
assert_eq!;
assert_ne!;
assert_ne!;
if value == b
Test two objects for total equality.
Examples
use eq;
let a = #;
let b = #;
assert_eq!;
assert_eq!;
assert_eq!;
let $out = clone
Clones an object.
Examples
let a = #;
let b = a.clone;
assert_eq!;
b.b = 43;
assert_ne!;
for item in value
Allows the value to be converted into an iterator in a for-loop.