pub struct Cargo {
pub command: String,
pub id: Option<String>,
pub name: Option<String>,
pub toolchain: Option<Version>,
pub args: Vec<String>,
}
Fields§
§command: String
The command to be executed for eg: fmt, clippy, build, test, etc.
id: Option<String>
The unique identifier of the Step.
name: Option<String>
Name of the Step
toolchain: Option<Version>
Toolchain to be used for example +nightly
.
args: Vec<String>
Arguments to be passed to the cargo command.
Implementations§
Source§impl Cargo
impl Cargo
Sourcepub fn new<T>(cmd: T) -> Cargowhere
T: ToString,
pub fn new<T>(cmd: T) -> Cargowhere
T: ToString,
Creates a new Cargo
instance with the specified command.
Sourcepub fn args<T>(self, args: T) -> Cargowhere
T: ToString,
pub fn args<T>(self, args: T) -> Cargowhere
T: ToString,
Sets the arguments for the cargo command. If arguments are already set, it will be overwritten.
Sourcepub fn add_args<T>(self, args: T) -> Cargowhere
T: ToString,
pub fn add_args<T>(self, args: T) -> Cargowhere
T: ToString,
Adds additional arguments to the cargo command.
Sourcepub fn add_args_when<T>(self, when: bool, args: T) -> Cargowhere
T: ToString,
pub fn add_args_when<T>(self, when: bool, args: T) -> Cargowhere
T: ToString,
Adds the arguments to the cargo command when a condition is met.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cargo
impl RefUnwindSafe for Cargo
impl Send for Cargo
impl Sync for Cargo
impl Unpin for Cargo
impl UnwindSafe for Cargo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more