toggle
Removes item from set if it is there, inserts it otherwise.
Import
Section titled “Import”Cargo feature set (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
set | &mut HashSet<T, S> | The set to change. |
item | T | The element to flip. |
Returns
Section titled “Returns”bool — true when item is in the set after the call (it was inserted), false when it was removed.
