Skip to main content

AsyncOrderedStoreRead

Trait AsyncOrderedStoreRead 

Source
pub trait AsyncOrderedStoreRead: AsyncStoreRead<Key: Ord> {
    // Required method
    fn last(&self) -> impl Future<Output = Option<(Self::Key, Self::Value)>>;
}
Expand description

Async version of OrderedStore

Required Methods§

Source

fn last(&self) -> impl Future<Output = 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 not dyn compatible.

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

Implementors§