Trait orchestrator::memory::StateMemory
source · pub trait StateMemory<S: ExecutorGlobalState> {
// Required methods
fn enable_executor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 S,
output: &'life2 S,
data: String,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_execution_plan<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 S,
) -> Pin<Box<dyn Future<Output = Result<Vec<(TypeId, TypeId, String)>, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add_exercise<'life0, 'async_trait>(
&'life0 self,
name: String,
exercise_type: S,
source: String,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_exercise<'life0, 'async_trait>(
&'life0 self,
name: String,
) -> Pin<Box<dyn Future<Output = Result<(TypeId, String), Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
This is the trait that contains all method of the memory that does require knowing the state. Is not always available
Required Methods§
sourcefn enable_executor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 S,
output: &'life2 S,
data: String,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn enable_executor<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 S,
output: &'life2 S,
data: String,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
used to enable a particular executor
sourcefn get_execution_plan<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 S,
) -> Pin<Box<dyn Future<Output = Result<Vec<(TypeId, TypeId, String)>, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_execution_plan<'life0, 'life1, 'async_trait>(
&'life0 self,
input: &'life1 S,
) -> Pin<Box<dyn Future<Output = Result<Vec<(TypeId, TypeId, String)>, Box<dyn Error + Send + Sync + 'static>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
from a particular state, which executor will be triggered? in which order?