Trait StorageCollection
Source pub trait StorageCollection: Send + Sync {
// Required methods
fn set_state<'life0, 'async_trait>(
&'life0 self,
state: Attested<EntityState>,
) -> Pin<Box<dyn Future<Output = Result<bool, MutationError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_state<'life0, 'async_trait>(
&'life0 self,
id: EntityId,
) -> Pin<Box<dyn Future<Output = Result<Attested<EntityState>, RetrievalError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn fetch_states<'life0, 'life1, 'async_trait>(
&'life0 self,
selection: &'life1 Selection,
) -> Pin<Box<dyn Future<Output = Result<Vec<Attested<EntityState>>, RetrievalError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add_event<'life0, 'life1, 'async_trait>(
&'life0 self,
entity_event: &'life1 Attested<Event>,
) -> Pin<Box<dyn Future<Output = Result<bool, MutationError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_events<'life0, 'async_trait>(
&'life0 self,
event_ids: Vec<EventId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Attested<Event>>, RetrievalError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn dump_entity_events<'life0, 'async_trait>(
&'life0 self,
id: EntityId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Attested<Event>>, RetrievalError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn set_states<'life0, 'async_trait>(
&'life0 self,
states: Vec<Attested<EntityState>>,
) -> Pin<Box<dyn Future<Output = Result<(), MutationError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn get_states<'life0, 'async_trait>(
&'life0 self,
ids: Vec<EntityId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Attested<EntityState>>, RetrievalError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
Retrieve a list of events
Retrieve all events from the collection