pub trait StateStorage: QueryState {
// Required methods
fn update_state(
&self,
address: &ContentAddress,
key: &Key,
value: Vec<Word>,
) -> impl Future<Output = Result<Vec<Word>>> + Send;
fn update_state_batch<U>(
&self,
updates: U,
) -> impl Future<Output = Result<Vec<Vec<Word>>>> + Send
where U: IntoIterator<Item = (ContentAddress, Key, Vec<Word>)> + Send;
}Expand description
Storage trait just for state reads and writes.
Required Methods§
Sourcefn update_state(
&self,
address: &ContentAddress,
key: &Key,
value: Vec<Word>,
) -> impl Future<Output = Result<Vec<Word>>> + Send
fn update_state( &self, address: &ContentAddress, key: &Key, value: Vec<Word>, ) -> impl Future<Output = Result<Vec<Word>>> + Send
Update the state of a content address.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.