mk_lib::schema

Enum CommandRunner

Source
pub enum CommandRunner {
    LocalRun {
        command: String,
        shell: String,
        work_dir: Option<String>,
        ignore_errors: bool,
        verbose: bool,
    },
    TaskRun {
        task: String,
        ignore_errors: bool,
        verbose: bool,
    },
    ContainerRun {
        container_command: Vec<String>,
        image: String,
        mounted_paths: Vec<String>,
        ignore_errors: bool,
        verbose: bool,
    },
}

Variantsยง

ยง

LocalRun

Fields

ยงcommand: String

The command to run

ยงshell: String

The shell to use to run the command

ยงwork_dir: Option<String>

The working directory to run the command in

ยงignore_errors: bool

Ignore errors if the command fails

ยงverbose: bool

Show verbose output

ยง

TaskRun

Fields

ยงtask: String

The name of the task to run

ยงignore_errors: bool
ยงverbose: bool
ยง

ContainerRun

Fields

ยงcontainer_command: Vec<String>

The command to run in the container

ยงimage: String

The container image to use

ยงmounted_paths: Vec<String>

The mounted paths to bind mount into the container

ยงignore_errors: bool

Ignore errors if the command fails

ยงverbose: bool

Show verbose output

Implementationsยง

Sourceยง

impl CommandRunner

Source

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

Trait Implementationsยง

Sourceยง

impl Debug for CommandRunner

Sourceยง

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

Formats the value using the given formatter. Read more
Sourceยง

impl<'de> Deserialize<'de> for CommandRunner

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 PartialEq for CommandRunner

Sourceยง

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

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 StructuralPartialEq for CommandRunner

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