Trait mz_storage::render::upsert::types::UpsertStateBackend
source · pub trait UpsertStateBackend {
// Required methods
fn multi_put<'life0, 'async_trait, P>(
&'life0 mut self,
puts: P
) -> Pin<Box<dyn Future<Output = Result<PutStats, Error>> + 'async_trait>>
where P: IntoIterator<Item = (UpsertKey, PutValue<StateValue>)> + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn multi_get<'r, 'life0, 'async_trait, G, R>(
&'life0 mut self,
gets: G,
results_out: R
) -> Pin<Box<dyn Future<Output = Result<GetStats, Error>> + 'async_trait>>
where G: IntoIterator<Item = UpsertKey> + 'async_trait,
R: IntoIterator<Item = &'r mut UpsertValueAndSize> + 'async_trait,
Self: 'async_trait,
'r: 'async_trait,
'life0: 'async_trait;
}
Expand description
A trait that defines the fundamental primitives required by a state-backing of
the upsert
operator.
Required Methods§
sourcefn multi_put<'life0, 'async_trait, P>(
&'life0 mut self,
puts: P
) -> Pin<Box<dyn Future<Output = Result<PutStats, Error>> + 'async_trait>>where
P: IntoIterator<Item = (UpsertKey, PutValue<StateValue>)> + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
fn multi_put<'life0, 'async_trait, P>( &'life0 mut self, puts: P ) -> Pin<Box<dyn Future<Output = Result<PutStats, Error>> + 'async_trait>>where P: IntoIterator<Item = (UpsertKey, PutValue<StateValue>)> + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,
Insert or delete for all puts
keys, prioritizing the last value for
repeated keys.
sourcefn multi_get<'r, 'life0, 'async_trait, G, R>(
&'life0 mut self,
gets: G,
results_out: R
) -> Pin<Box<dyn Future<Output = Result<GetStats, Error>> + 'async_trait>>where
G: IntoIterator<Item = UpsertKey> + 'async_trait,
R: IntoIterator<Item = &'r mut UpsertValueAndSize> + 'async_trait,
Self: 'async_trait,
'r: 'async_trait,
'life0: 'async_trait,
fn multi_get<'r, 'life0, 'async_trait, G, R>( &'life0 mut self, gets: G, results_out: R ) -> Pin<Box<dyn Future<Output = Result<GetStats, Error>> + 'async_trait>>where G: IntoIterator<Item = UpsertKey> + 'async_trait, R: IntoIterator<Item = &'r mut UpsertValueAndSize> + 'async_trait, Self: 'async_trait, 'r: 'async_trait, 'life0: 'async_trait,
Get the gets
keys, which must be unique, placing the results in results_out
.
Panics if gets
and results_out
are not the same length.
Object Safety§
This trait is not object safe.