pub trait ChildMachine: Send + Sync {
// Required methods
fn send_event<'life0, 'async_trait>(
&'life0 mut self,
event: Event,
) -> Pin<Box<dyn Future<Output = Result<bool, StateError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IntegrationResult<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn is_in_final_state(&self) -> bool;
fn is_in_state<'life0, 'life1, 'async_trait>(
&'life0 self,
state_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StateError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn current_states(&self) -> Vec<String>;
fn to_json(&self) -> IntegrationResult<String>;
}
Expand description
子ステートマシンのインターフェース
このトレイトは親ステートマシンから子ステートマシンへの 操作を抽象化するために使用されます。
Required Methods§
Sourcefn send_event<'life0, 'async_trait>(
&'life0 mut self,
event: Event,
) -> Pin<Box<dyn Future<Output = Result<bool, StateError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_event<'life0, 'async_trait>(
&'life0 mut self,
event: Event,
) -> Pin<Box<dyn Future<Output = Result<bool, StateError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn get_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IntegrationResult<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IntegrationResult<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn is_in_final_state(&self) -> bool
fn is_in_final_state(&self) -> bool
最終状態にあるか確認
Sourcefn is_in_state<'life0, 'life1, 'async_trait>(
&'life0 self,
state_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StateError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_in_state<'life0, 'life1, 'async_trait>(
&'life0 self,
state_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StateError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
特定の状態にあるか確認
Sourcefn current_states(&self) -> Vec<String>
fn current_states(&self) -> Vec<String>
現在の状態IDのリストを取得
Sourcefn to_json(&self) -> IntegrationResult<String>
fn to_json(&self) -> IntegrationResult<String>
子ステートマシンのJSON表現を取得