Action

Trait Action 

Source
pub trait Action: Debug + AsAny {
    // Required methods
    fn id(&self) -> &ActionId;
    fn start(
        &mut self,
        step: &Step,
        step_name: Option<&str>,
        step_data: &StateDataFiltered<'_>,
        vars: &ObjectStoreFiltered<'_, Box<dyn Var + Send + Sync>, VarId>,
    ) -> Result<ActionResult, ActionError>;
}
Expand description

Actions fulfill the outputs of a Step

Required Methods§

Source

fn id(&self) -> &ActionId

Get the ID for the Action

Source

fn start( &mut self, step: &Step, step_name: Option<&str>, step_data: &StateDataFiltered<'_>, vars: &ObjectStoreFiltered<'_, Box<dyn Var + Send + Sync>, VarId>, ) -> Result<ActionResult, ActionError>

Start the action for a Step

step_data and vars only have access to input and output data declared by the Step.

Implementations§

Source§

impl dyn Action + Send + Sync

Source

pub fn downcast<T>(&self) -> Option<&T>
where T: Action + Any,

Source

pub fn is<T>(&self) -> bool
where T: Action + Any,

Trait Implementations§

Source§

impl ObjectStoreContent for Box<dyn Action + Sync + Send>

Source§

type IdType = ActionId

Source§

fn new_id(id_val: u16) -> Self::IdType

Source§

fn id(&self) -> &Self::IdType

Implementors§