Trait bustle::CollectionHandle
source · [−]pub trait CollectionHandle {
type Key: From<u64>;
fn get(&mut self, key: &Self::Key) -> bool;
fn insert(&mut self, key: &Self::Key) -> bool;
fn remove(&mut self, key: &Self::Key) -> bool;
fn update(&mut self, key: &Self::Key) -> bool;
}
Expand description
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.
Required Associated Types
Required Methods
Perform a lookup for key
.
Should return true
if the key is found.
Insert key
into the collection.
Should return true
if no value previously existed for the key.
Remove key
from the collection.
Should return true
if the key existed and was removed.