[−][src]Struct workflow::Step
Step represent a single, instruction in the Workflow
Like a workflow, a step is mainly defined in two parts:
- The metadata: step name
- The instructions: the command to run, the parameters, etc...
There's two kind of steps currently existing:
The executable step
A step is executable if it can be executed directly (i.e if a command is defined on the step)
use workflow::Step; use std::collections::HashMap; let step = Step { name: Some("Test step".to_string()), uses: None, exec: Some("echo {name}".to_string()), with: Some(HashMap::default()), }; assert!(step.executable());
The referral step
A step is referral if it cannot be executed directly, but rather call another workflow to perform the job.
use workflow::Step; use std::collections::HashMap; let step = Step { name: Some("Test step".to_string()), uses: Some("std-download".to_string()), // The workflow to run exec: None, with: Some(HashMap::default()), }; assert!(!step.executable());
The referral system allows to build complex workflow while not re-inventing existing but rathers use already defined workflow.
Fields
name: Option<String>
The optional step name.
uses: Option<String>
The id of the workflow to be executed.
exec: Option<String>
The command to execute. This will step as executable.
with: Option<HashMap<String, String>>
The optional step args.
Implementations
impl Step
[src]
pub fn executable(&self) -> bool
[src]
executable
determines if the step is an executable one
Trait Implementations
impl Debug for Step
[src]
impl Default for Step
[src]
impl<'de> Deserialize<'de> for Step
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Step
[src]
Auto Trait Implementations
impl RefUnwindSafe for Step
impl Send for Step
impl Sync for Step
impl Unpin for Step
impl UnwindSafe for Step
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,