gh_workflow

Struct Step

Source
pub struct Step<T> {
    pub id: Option<String>,
    pub name: Option<String>,
    pub if_condition: Option<Expression>,
    pub uses: Option<String>,
    pub run: Option<String>,
    pub env: Option<IndexMap<String, String>>,
    pub timeout_minutes: Option<u32>,
    pub continue_on_error: Option<bool>,
    pub working_directory: Option<String>,
    pub retry: Option<RetryStrategy>,
    pub artifacts: Option<Artifacts>,
    /* private fields */
}

Fields§

§id: Option<String>§name: Option<String>§if_condition: Option<Expression>§uses: Option<String>§run: Option<String>§env: Option<IndexMap<String, String>>§timeout_minutes: Option<u32>§continue_on_error: Option<bool>§working_directory: Option<String>§retry: Option<RetryStrategy>§artifacts: Option<Artifacts>

Implementations§

Source§

impl<T> Step<T>

Source

pub fn id(self, value: String) -> Self

Sets the id field of this struct.

Source

pub fn if_condition(self, value: Expression) -> Self

Sets the if_condition field of this struct.

Source

pub fn timeout_minutes(self, value: u32) -> Self

Sets the timeout_minutes field of this struct.

Source

pub fn continue_on_error(self, value: bool) -> Self

Sets the continue_on_error field of this struct.

Source

pub fn working_directory(self, value: String) -> Self

Sets the working_directory field of this struct.

Source

pub fn retry(self, value: RetryStrategy) -> Self

Sets the retry field of this struct.

Source

pub fn artifacts(self, value: Artifacts) -> Self

Sets the artifacts field of this struct.

Source

pub fn marker(self, value: PhantomData<T>) -> Self

Source§

impl<T> Step<T>

Source

pub fn name<S: ToString>(self, name: S) -> Self

Source

pub fn env<R: SetEnv<Self>>(self, env: R) -> Self

Source§

impl Step<Run>

Source

pub fn run<T: ToString>(cmd: T) -> Self

Source

pub fn cargo<T: ToString, P: ToString>(cmd: T, params: Vec<P>) -> Self

Source

pub fn cargo_nightly<T: ToString, P: ToString>(cmd: T, params: Vec<P>) -> Self

Source§

impl Step<Use>

Source

pub fn uses<Owner: ToString, Repo: ToString>( owner: Owner, repo: Repo, version: u64, ) -> Self

Source

pub fn with<K: SetInput>(self, item: K) -> Self

Source

pub fn checkout() -> Self

Source

pub fn setup_rust() -> ToolchainStep

Trait Implementations§

Source§

impl<T> AddStep for Step<T>
where Step<T>: Into<AnyStep>,

Source§

fn apply(self, job: Job) -> Job

Source§

impl<T: Clone> Clone for Step<T>

Source§

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

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<T: Debug> Debug for Step<T>

Source§

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

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

impl<T: Default> Default for Step<T>

Source§

fn default() -> Step<T>

Returns the “default value” for a type. Read more
Source§

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

Source§

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

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

impl From<Step<Run>> for AnyStep

Source§

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

Converts to this type from the input type.
Source§

impl From<Step<Run>> for Step<AnyStep>

Source§

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

Converts to this type from the input type.
Source§

impl From<Step<Use>> for AnyStep

Source§

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

Converts to this type from the input type.
Source§

impl From<Step<Use>> for Step<AnyStep>

Source§

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

Converts to this type from the input type.
Source§

impl<T: PartialEq> PartialEq for Step<T>

Source§

fn eq(&self, other: &Step<T>) -> 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<T> Serialize for Step<T>

Source§

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

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

impl<T> SetEnv<Step<T>> for RustFlags

Source§

fn apply(self, value: Step<T>) -> Step<T>

Source§

impl<S1: Display, S2: Display> SetEnv<Step<Use>> for (S1, S2)

Source§

fn apply(self, step: Step<Use>) -> Step<Use>

Source§

impl<T: Eq> Eq for Step<T>

Source§

impl<T> StructuralPartialEq for Step<T>

Auto Trait Implementations§

§

impl<T> Freeze for Step<T>

§

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

§

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

§

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

§

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

§

impl<T> UnwindSafe for Step<T>
where T: 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 T)

🔬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>,