pub trait LoadState<ID: EventId, S, E: Event + Clone> {
// Required method
fn load<'life0, 'async_trait>(
&'life0 self,
state_query: S,
) -> Pin<Box<dyn Future<Output = Result<LoadedState<ID, S>, BoxDynError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait to load a state.
This trait for loading a state from the storage backend.
Required Methods§
Sourcefn load<'life0, 'async_trait>(
&'life0 self,
state_query: S,
) -> Pin<Box<dyn Future<Output = Result<LoadedState<ID, S>, BoxDynError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load<'life0, 'async_trait>(
&'life0 self,
state_query: S,
) -> Pin<Box<dyn Future<Output = Result<LoadedState<ID, S>, BoxDynError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".