[−][src]Trait splinter::storage::sets::DurableSet
A Durable Set.
This trait provides an API for interacting with Durable sets that may be backed by a wide variety of persistent storage.
Associated Types
Loading content...Required methods
fn add(&mut self, item: Self::Item) -> Result<(), DurableSetError>
Add an item to the set.
fn remove(
&mut self,
item: &Self::Item
) -> Result<Option<Self::Item>, DurableSetError>
&mut self,
item: &Self::Item
) -> Result<Option<Self::Item>, DurableSetError>
Remove an item to the set.
fn contains(&self, item: &Self::Item) -> Result<bool, DurableSetError>
Get a value based on the query item.
fn iter<'a>(
&'a self
) -> Result<Box<dyn Iterator<Item = Self::Item> + 'a>, DurableSetError>
&'a self
) -> Result<Box<dyn Iterator<Item = Self::Item> + 'a>, DurableSetError>
Returns an iterator over the contents of the set.
fn len(&self) -> Result<u64, DurableSetError>
Returns the count of the values in the set.
Provided methods
fn is_empty(&self) -> Result<bool, DurableSetError>
Implementors
impl<V> DurableSet for DurableBTreeSet<V> where
V: Send + Ord + Clone,
[src]
V: Send + Ord + Clone,
type Item = V
fn add(&mut self, item: Self::Item) -> Result<(), DurableSetError>
[src]
Add an item to the set.
fn remove(
&mut self,
item: &Self::Item
) -> Result<Option<Self::Item>, DurableSetError>
[src]
&mut self,
item: &Self::Item
) -> Result<Option<Self::Item>, DurableSetError>
Remove an item to the set.
fn iter<'a>(
&'a self
) -> Result<Box<dyn Iterator<Item = Self::Item> + 'a>, DurableSetError>
[src]
&'a self
) -> Result<Box<dyn Iterator<Item = Self::Item> + 'a>, DurableSetError>
fn contains(&self, item: &Self::Item) -> Result<bool, DurableSetError>
[src]
fn len(&self) -> Result<u64, DurableSetError>
[src]
impl<V: Send + Hash + Eq + Clone> DurableSet for DurableHashSet<V>
[src]
type Item = V
fn add(&mut self, item: Self::Item) -> Result<(), DurableSetError>
[src]
Add an item to the set.
fn remove(
&mut self,
item: &Self::Item
) -> Result<Option<Self::Item>, DurableSetError>
[src]
&mut self,
item: &Self::Item
) -> Result<Option<Self::Item>, DurableSetError>
Remove an item to the set.
fn iter<'a>(
&'a self
) -> Result<Box<dyn Iterator<Item = Self::Item> + 'a>, DurableSetError>
[src]
&'a self
) -> Result<Box<dyn Iterator<Item = Self::Item> + 'a>, DurableSetError>