pub trait ViewStateRepository<E, S, Error> {
// Required methods
fn fetch_state<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 E
) -> Pin<Box<dyn Future<Output = Result<Option<S>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 S
) -> Pin<Box<dyn Future<Output = Result<S, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
View State Repository trait
Generic parameters:
E
- EventS
- StateError
- Error