Trait StorageCollection

Source
pub trait StorageCollection: Send + Sync {
    // Required methods
    fn set_state<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: ID,
        state: &'life1 State,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_state<'life0, 'async_trait>(
        &'life0 self,
        id: ID,
    ) -> Pin<Box<dyn Future<Output = Result<State, RetrievalError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn fetch_states<'life0, 'life1, 'async_trait>(
        &'life0 self,
        predicate: &'life1 Predicate,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<(ID, State)>, 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 Event,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_events<'life0, 'async_trait>(
        &'life0 self,
        id: ID,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, RetrievalError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn set_states<'life0, 'life1, 'async_trait>(
        &'life0 self,
        entities: Vec<(ID, &'life1 State)>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Methods§

Source

fn set_state<'life0, 'life1, 'async_trait>( &'life0 self, id: ID, state: &'life1 State, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_state<'life0, 'async_trait>( &'life0 self, id: ID, ) -> Pin<Box<dyn Future<Output = Result<State, RetrievalError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_states<'life0, 'life1, 'async_trait>( &'life0 self, predicate: &'life1 Predicate, ) -> Pin<Box<dyn Future<Output = Result<Vec<(ID, State)>, RetrievalError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn add_event<'life0, 'life1, 'async_trait>( &'life0 self, entity_event: &'life1 Event, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_events<'life0, 'async_trait>( &'life0 self, id: ID, ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, RetrievalError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn set_states<'life0, 'life1, 'async_trait>( &'life0 self, entities: Vec<(ID, &'life1 State)>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§