pub trait Action: Send + Sync {
// Required methods
fn run<'life0, 'async_trait>(
&'life0 self,
runtime: Runtime,
operation: Operation,
) -> Pin<Box<dyn Future<Output = Result<Option<ActionOutput>, ActionError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn probe<'life0, 'async_trait>(
&'life0 self,
runtime: Runtime,
) -> Pin<Box<dyn Future<Output = Result<Probe, ActionError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn display_name(&self) -> String;
// Provided method
fn load_state<'life0, 'life1, 'async_trait>(
&'life0 self,
_builder: &'life1 mut RuntimeBuilder,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
A measurable, reversible task.
Any Action can test its environment to see if
it needs to run at all, and can undo any changes
it has made. Any Action can also depend on
other Actions, and the engine will ensure that
all dependencies are run before the Action itself.
Required Methods§
Sourcefn run<'life0, 'async_trait>(
&'life0 self,
runtime: Runtime,
operation: Operation,
) -> Pin<Box<dyn Future<Output = Result<Option<ActionOutput>, ActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
runtime: Runtime,
operation: Operation,
) -> Pin<Box<dyn Future<Output = Result<Option<ActionOutput>, ActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn probe<'life0, 'async_trait>(
&'life0 self,
runtime: Runtime,
) -> Pin<Box<dyn Future<Output = Result<Probe, ActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn probe<'life0, 'async_trait>(
&'life0 self,
runtime: Runtime,
) -> Pin<Box<dyn Future<Output = Result<Probe, ActionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Probe the action for specific information.
Sourcefn display_name(&self) -> String
fn display_name(&self) -> String
Get the display name of the action.
Provided Methods§
Sourcefn load_state<'life0, 'life1, 'async_trait>(
&'life0 self,
_builder: &'life1 mut RuntimeBuilder,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_state<'life0, 'life1, 'async_trait>(
&'life0 self,
_builder: &'life1 mut RuntimeBuilder,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load required state.