pub struct StepDefinition {
pub id: String,
pub step_type: StepType,
pub algorithm: String,
pub parameters: BTreeMap<String, ParameterValue>,
pub inputs: Vec<String>,
pub outputs: Vec<String>,
pub condition: Option<ExecutionCondition>,
pub description: Option<String>,
}Expand description
Step definition in the workflow
Fields§
§id: StringStep identifier
step_type: StepTypeStep type
algorithm: StringAlgorithm/component name
parameters: BTreeMap<String, ParameterValue>Parameters
inputs: Vec<String>Input mappings
outputs: Vec<String>Output mappings
condition: Option<ExecutionCondition>Conditional execution
description: Option<String>Description
Implementations§
Source§impl StepDefinition
impl StepDefinition
Sourcepub fn new(id: &str, step_type: StepType, algorithm: &str) -> Self
pub fn new(id: &str, step_type: StepType, algorithm: &str) -> Self
Create a new step definition
Sourcepub fn with_parameter(self, name: &str, value: ParameterValue) -> Self
pub fn with_parameter(self, name: &str, value: ParameterValue) -> Self
Add a parameter to the step
Sourcepub fn with_input(self, input: &str) -> Self
pub fn with_input(self, input: &str) -> Self
Add an input mapping
Sourcepub fn with_output(self, output: &str) -> Self
pub fn with_output(self, output: &str) -> Self
Add an output mapping
Sourcepub fn with_description(self, description: &str) -> Self
pub fn with_description(self, description: &str) -> Self
Set description
Trait Implementations§
Source§impl Clone for StepDefinition
impl Clone for StepDefinition
Source§fn clone(&self) -> StepDefinition
fn clone(&self) -> StepDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StepDefinition
impl Debug for StepDefinition
Source§impl<'de> Deserialize<'de> for StepDefinition
impl<'de> Deserialize<'de> for StepDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StepDefinition
impl RefUnwindSafe for StepDefinition
impl Send for StepDefinition
impl Sync for StepDefinition
impl Unpin for StepDefinition
impl UnwindSafe for StepDefinition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more