Skip to main content

OrderedStoreRead

Trait OrderedStoreRead 

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

Extension to regular Stores, which have ordered keys

Required Methods§

Source

fn last(&self) -> Option<(Self::Key, Self::Value)>

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§