Skip to main content

AppendableStore

Trait AppendableStore 

Source
pub trait AppendableStore: OrderedStoreRead {
    // Required method
    fn append(&self, value: Self::Value) -> Self::Key;
}
Expand description

Extension to regular Stores, which use an index as a key

The main difference is, that the values can be inserted without providing a key. The key is then returned after insertion.

The key that was returned last must have be the largest value wrt Ord.

Required Methods§

Source

fn append(&self, value: Self::Value) -> Self::Key

Insert a value into the store and return the index

§Arguments:
  • value: the value itself
§Returns:
  • the index of the new value. This is the key under which the value can later be retreived

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§