TaskArgs

Struct TaskArgs 

Source
pub struct TaskArgs {
    pub commands: Vec<CommandRunner>,
    pub preconditions: Vec<Precondition>,
    pub depends_on: Vec<TaskDependency>,
    pub labels: HashMap<String, String>,
    pub description: String,
    pub environment: HashMap<String, String>,
    pub env_file: Vec<String>,
    pub shell: Option<Shell>,
    pub parallel: Option<bool>,
    pub ignore_errors: Option<bool>,
    pub verbose: Option<bool>,
}
Expand description

This struct represents a task that can be executed. A task can contain multiple commands that are executed sequentially. A task can also have preconditions that must be met before the task can be executed.

Fields§

§commands: Vec<CommandRunner>

The commands to run

§preconditions: Vec<Precondition>

The preconditions that must be met before the task can be executed

§depends_on: Vec<TaskDependency>

The tasks that must be executed before this task can be executed

§labels: HashMap<String, String>

The labels for the task

§description: String

The description of the task

§environment: HashMap<String, String>

The environment variables to set before running the task

§env_file: Vec<String>

The environment files to load before running the task

§shell: Option<Shell>

The shell to use when running the task

§parallel: Option<bool>

Run the commands in parallel It should only work if the task are local_run commands

§ignore_errors: Option<bool>

Ignore errors if the task fails

§verbose: Option<bool>

Show verbose output

Implementations§

Source§

impl TaskArgs

Source

pub fn run(&self, context: &mut TaskContext) -> Result<()>

Trait Implementations§

Source§

impl Debug for TaskArgs

Source§

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

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

impl Default for TaskArgs

Source§

fn default() -> TaskArgs

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

impl<'de> Deserialize<'de> for TaskArgs

Source§

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§

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> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSend for T