Skip to main content

StepBuilder

Struct StepBuilder 

Source
pub struct StepBuilder { /* private fields */ }
Expand description

Builder for creating Step instances with reduced boilerplate.

Implementations§

Source§

impl StepBuilder

Source

pub fn new<S: Into<String>>(id: S) -> Self

Create a new StepBuilder with the given step ID.

Source

pub fn component<S: Into<String>>(self, component: S) -> Self

Set the component for this step.

Source

pub fn input(self, input: ValueExpr) -> Self

Set the input template for this step.

Source

pub fn input_json(self, input: Value) -> Self

Set the input from a JSON value, parsing it as a ValueExpr.

Source

pub fn input_literal(self, input: Value) -> Self

Set the input as a literal JSON value.

Source

pub fn on_error(self, action: ErrorAction) -> Self

Set the error action.

Source

pub fn must_execute(self, must_execute: bool) -> Self

Set whether this step must execute even if its output is not used.

Source

pub fn metadata<S: Into<String>>(self, key: S, value: Value) -> Self

Add metadata.

Source

pub fn mock_step<S: Into<String>>(id: S) -> Self

Create a mock step with a default mock component.

Source

pub fn builtin_step<S: Into<String>>(id: S, component: S) -> Self

Create a builtin step with the specified builtin component.

Source

pub fn step_ref<S: Into<String>>(id: S, ref_step: S) -> Self

Create a step that references another step’s output.

Source

pub fn workflow_input<S: Into<String>>(id: S) -> Self

Create a step that references workflow input.

Source

pub fn build(self) -> Step

Build the final Step instance.

Auto Trait Implementations§

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> 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.
Source§

impl<T> Erased for T