Skip to main content

OrderedStoreRead

Trait OrderedStoreRead 

Source
pub trait OrderedStoreRead<K: Ord, V>: StoreRead<K, V> {
    // Required method
    fn last(&self) -> Option<(K, V)>;
}
Expand description

Extension to regular Stores, which have ordered keys

Required Methods§

Source

fn last(&self) -> Option<(K, V)>

Returns the last element in the store

The last element is the largest element with respect to the keys Ord implementation.

§Returns
  • Some(key, value) if the store is non-empty
  • None otherwise

Implementors§

Source§

impl<K: Ord + Clone, V: Clone> OrderedStoreRead<K, V> for MemoryStore<K, V>