Skip to main content

Module ops

Module ops 

Source
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.
GetByLeft
Returns a reference to the right value corresponding to the given left value in a bidirectional map.
GetByRight
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.
RemoveByLeft
Remove the left and right values from pair corresponding to the given left value in a bidirectional map.
RemoveByRight
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.