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
impl Step
Sourcepub fn new(
id: StepId,
input_vars: Option<Vec<VarId>>,
output_vars: Vec<VarId>,
) -> Self
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
pub fn get_input_vars(&self) -> &Option<Vec<VarId>>
pub fn get_output_vars(&self) -> &Vec<VarId>
Sourcepub fn push_substep(&mut self, substep_step_id: StepId)
pub fn push_substep(&mut self, substep_step_id: StepId)
Push a substep to the end of the current sub-steps
Sourcepub fn next_substep(&self, prev_substep_id: &StepId) -> Option<&StepId>
pub fn next_substep(&self, prev_substep_id: &StepId) -> Option<&StepId>
Get the sub-step that directly follows prev_substep_id
pub fn first_substep(&self) -> Option<&StepId>
Trait Implementations§
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more