pub struct CommandInstruction {
pub builder: bool,
pub args: Vec<String>,
pub env: FxHashMap<String, String>,
pub exe: String,
pub cwd: Option<PathBuf>,
}Expand description
A command and its parameters to be executed as a child process.
Fields§
§builder: boolIf the executable should reference a builder executable.
args: Vec<String>List of arguments.
env: FxHashMap<String, String>Map of environment variables.
exe: StringThe executable on PATH.
cwd: Option<PathBuf>The working directory.
Implementations§
Source§impl CommandInstruction
impl CommandInstruction
Sourcepub fn new<T: AsRef<str>, I: IntoIterator<Item = V>, V: AsRef<str>>(
exe: T,
args: I,
) -> Self
pub fn new<T: AsRef<str>, I: IntoIterator<Item = V>, V: AsRef<str>>( exe: T, args: I, ) -> Self
Create a new command with the executable and arguments.
Sourcepub fn with_builder<T: AsRef<str>, I: IntoIterator<Item = V>, V: AsRef<str>>(
id: T,
args: I,
) -> Self
pub fn with_builder<T: AsRef<str>, I: IntoIterator<Item = V>, V: AsRef<str>>( id: T, args: I, ) -> Self
Create a new command that executes an executable from a builder with the arguments.
Trait Implementations§
Source§impl Clone for CommandInstruction
impl Clone for CommandInstruction
Source§fn clone(&self) -> CommandInstruction
fn clone(&self) -> CommandInstruction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommandInstruction
impl Debug for CommandInstruction
Source§impl Default for CommandInstruction
impl Default for CommandInstruction
Source§fn default() -> CommandInstruction
fn default() -> CommandInstruction
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CommandInstruction
impl<'de> Deserialize<'de> for CommandInstruction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 CommandInstruction
impl PartialEq for CommandInstruction
Source§impl Serialize for CommandInstruction
impl Serialize for CommandInstruction
impl StructuralPartialEq for CommandInstruction
Auto Trait Implementations§
impl Freeze for CommandInstruction
impl RefUnwindSafe for CommandInstruction
impl Send for CommandInstruction
impl Sync for CommandInstruction
impl Unpin for CommandInstruction
impl UnwindSafe for CommandInstruction
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