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.
Insert a value into the store and return the index
§Arguments:
§Returns:
- the index of the new value. This is the key under which the value can later be retreived
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".