Struct Step

Source
pub struct Step<A> { /* private fields */ }
Expand description

Represents a step in the workflow.

Implementations§

Source§

impl Step<Run>

Source

pub fn id(self, value: impl Into<String>) -> Step<Run>

Sets the id field of this struct.

Source

pub fn name(self, value: impl Into<String>) -> Step<Run>

Sets the name field of this struct.

Source

pub fn if_condition(self, value: impl Into<Expression>) -> Step<Run>

Sets the if_condition field of this struct.

Source

pub fn with(self, value: impl Into<Input>) -> Step<Run>

Sets the with field of this struct.

Source

pub fn env(self, value: impl Into<Env>) -> Step<Run>

Sets the env field of this struct.

Source

pub fn timeout_minutes(self, value: impl Into<u32>) -> Step<Run>

Sets the timeout_minutes field of this struct.

Source

pub fn continue_on_error(self, value: impl Into<bool>) -> Step<Run>

Sets the continue_on_error field of this struct.

Source

pub fn working_directory(self, value: impl Into<String>) -> Step<Run>

Sets the working_directory field of this struct.

Source

pub fn retry(self, value: impl Into<RetryStrategy>) -> Step<Run>

Sets the retry field of this struct.

Source

pub fn artifacts(self, value: impl Into<Artifacts>) -> Step<Run>

Sets the artifacts field of this struct.

Source§

impl Step<Use>

Source

pub fn id(self, value: impl Into<String>) -> Step<Use>

Sets the id field of this struct.

Source

pub fn name(self, value: impl Into<String>) -> Step<Use>

Sets the name field of this struct.

Source

pub fn if_condition(self, value: impl Into<Expression>) -> Step<Use>

Sets the if_condition field of this struct.

Source

pub fn with(self, value: impl Into<Input>) -> Step<Use>

Sets the with field of this struct.

Source

pub fn env(self, value: impl Into<Env>) -> Step<Use>

Sets the env field of this struct.

Source

pub fn timeout_minutes(self, value: impl Into<u32>) -> Step<Use>

Sets the timeout_minutes field of this struct.

Source

pub fn continue_on_error(self, value: impl Into<bool>) -> Step<Use>

Sets the continue_on_error field of this struct.

Source

pub fn working_directory(self, value: impl Into<String>) -> Step<Use>

Sets the working_directory field of this struct.

Source

pub fn retry(self, value: impl Into<RetryStrategy>) -> Step<Use>

Sets the retry field of this struct.

Source

pub fn artifacts(self, value: impl Into<Artifacts>) -> Step<Use>

Sets the artifacts field of this struct.

Source§

impl<T> Step<T>

Represents a step in the workflow.

Source

pub fn add_env<R>(self, new_env: R) -> Step<T>
where R: Into<Env>,

Adds an environment variable to the step.

Source§

impl Step<Run>

Represents a step that runs a command.

Source

pub fn run<T>(cmd: T) -> Step<Run>
where T: ToString,

Creates a new Step<Run> that runs the provided shell command.

Source§

impl Step<Use>

Represents a step that uses an action.

Source

pub fn uses<Owner, Repo, Version>( owner: Owner, repo: Repo, version: Version, ) -> Step<Use>
where Owner: ToString, Repo: ToString, Version: ToString,

Creates a new Step<Use> that uses an action.

Source

pub fn checkout() -> Step<Use>

Creates a step pointing to the default GitHub’s Checkout Action.

Source

pub fn add_with<I>(self, new_with: I) -> Step<Use>
where I: Into<Input>,

Adds a new input to the step.

Source

pub fn add_with_when<I>(self, cond: bool, new_with: I) -> Step<Use>
where I: Into<Input>,

Adds a new input to the step when a condition is met.

Trait Implementations§

Source§

impl<A> Clone for Step<A>
where A: Clone,

Source§

fn clone(&self) -> Step<A>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A> Debug for Step<A>
where A: Debug,

Source§

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

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

impl<'de, A> Deserialize<'de> for Step<A>

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<Step<A>, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<Cargo> for Step<Run>

Source§

fn from(value: Cargo) -> Step<Run>

Converts to this type from the input type.
Source§

impl From<Release> for Step<Use>

Source§

fn from(value: Release) -> Step<Use>

Converts to this type from the input type.
Source§

impl From<Step<Run>> for StepValue

Source§

fn from(step: Step<Run>) -> StepValue

Converts a Step<Run> into a StepValue.

Source§

impl From<Step<Use>> for StepValue

Source§

fn from(step: Step<Use>) -> StepValue

Converts a Step<Use> into a StepValue.

Source§

impl From<Toolchain> for Step<Use>

Source§

fn from(value: Toolchain) -> Step<Use>

Converts to this type from the input type.
Source§

impl<A> PartialEq for Step<A>
where A: PartialEq,

Source§

fn eq(&self, other: &Step<A>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A> Serialize for Step<A>

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<A> Eq for Step<A>
where A: Eq,

Source§

impl<A> StructuralPartialEq for Step<A>

Auto Trait Implementations§

§

impl<A> Freeze for Step<A>

§

impl<A> RefUnwindSafe for Step<A>
where A: RefUnwindSafe,

§

impl<A> Send for Step<A>
where A: Send,

§

impl<A> Sync for Step<A>
where A: Sync,

§

impl<A> Unpin for Step<A>
where A: Unpin,

§

impl<A> UnwindSafe for Step<A>
where A: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,