Trait bustle::CollectionHandle [−][src]
A handle to a key-value collection.
Note that for all these methods, the benchmarker does not dictate what the values are. Feel free to use the same value for all operations, or use distinct ones and check that your retrievals indeed return the right results.
Associated Types
type Key: From<u64>
[src]
The u64
seeds used to construct Key
(through From<u64>
) are distinct.
The returned keys must be as well.
Required methods
fn get(&mut self, key: &Self::Key) -> bool
[src]
Perform a lookup for key
.
Should return true
if the key is found.
fn insert(&mut self, key: &Self::Key) -> bool
[src]
Insert key
into the collection.
Should return true
if no value previously existed for the key.
fn remove(&mut self, key: &Self::Key) -> bool
[src]
Remove key
from the collection.
Should return true
if the key existed and was removed.
fn update(&mut self, key: &Self::Key) -> bool
[src]
Update the value for key
in the collection, if it exists.
Should return true
if the key existed and was updated.
Should not insert the key if it did not exist.