Expand description
Individual container operation traits.
Traitsยง
- Assign
- Replace self with a new value.
- Clear
- Remove all elements from the collection.
- Get
- Returns a reference to the value corresponding to the key.
- GetBy
Left - Returns a reference to the right value corresponding to the given left value in a bidirectional map.
- GetBy
Right - Returns a reference to the left value corresponding to the given right value in a bidirectional map.
- Insert
- Insert a new key-value pair into the container at an arbitrary key.
- Len
- Returns the length of the collection.
- Modify
- Modify the value under key with a closure.
- Pop
- Remove the last element of the collection, returning it.
- Push
- Insert a value into the collection without specifying a key, returning the key that was automatically generated.
- Put
- Put a new value in the container.
- Remove
- Remove an element under a key from the collection, returning the value at the key if the key was previously in the map. Other keys are not invalidated.
- Remove
ByLeft - Remove the left and right values from pair corresponding to the given left value in a bidirectional map.
- Remove
ByRight - Remove the left and right values from pair corresponding to the given right value in a bidirectional map.
- Resize
- Resize the collection to the given length.
- Set
- Set the value of an already existing element under a key.
- WithOne
- Construct a container with exactly one element.