Skip to main content

AppendableStore

Trait AppendableStore 

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

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

The main difference is, that the key is a u64 and the store determines the key when inserting

Required Methods§

Source

fn append(&self, value: V) -> K

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

Implementors§