Struct Step

Source
pub struct Step {
    pub id: StepId,
    pub input_vars: Option<Vec<VarId>>,
    pub output_vars: Vec<VarId>,
    /* private fields */
}
Expand description

A single step in a flow

A step is defined by its the required inputs to enter the step and the outputs it must fulfill to exit the step. Substeps allow for grouping of steps and are executing in order by default.

Fields§

§id: StepId§input_vars: Option<Vec<VarId>>§output_vars: Vec<VarId>

Implementations§

Source§

impl Step

Source

pub fn new( id: StepId, input_vars: Option<Vec<VarId>>, output_vars: Vec<VarId>, ) -> Self

Create a new step.

If no inputs are required, pass in None for input_vars

Source

pub fn get_input_vars(&self) -> &Option<Vec<VarId>>

Source

pub fn get_output_vars(&self) -> &Vec<VarId>

Source

pub fn push_substep(&mut self, substep_step_id: StepId)

Push a substep to the end of the current sub-steps

Source

pub fn next_substep(&self, prev_substep_id: &StepId) -> Option<&StepId>

Get the sub-step that directly follows prev_substep_id

Source

pub fn first_substep(&self) -> Option<&StepId>

Source

pub fn can_enter(&self, inputs: &StateData) -> Result<(), IdError<VarId>>

Verifies that inputs fulfills the required inputs to enter the step

Source

pub fn can_exit(&self, state_data: &StateData) -> Result<(), IdError<VarId>>

Verifies that state_data fulfills the required outputs to exit the step

Trait Implementations§

Source§

impl Debug for Step

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl ObjectStoreContent for Step

Source§

type IdType = StepId

Source§

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

Source§

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

Auto Trait Implementations§

§

impl Freeze for Step

§

impl RefUnwindSafe for Step

§

impl Send for Step

§

impl Sync for Step

§

impl Unpin for Step

§

impl UnwindSafe for Step

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsAny for T
where T: Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.