pub struct CommandSpec {
pub stage: String,
pub program: Utf8PathBuf,
pub args: Vec<String>,
pub current_dir: Utf8PathBuf,
pub environment: BTreeMap<String, String>,
pub redacted_args: BTreeSet<usize>,
pub timeout: Duration,
}Expand description
One safely tokenized external command.
Fields§
§stage: StringHuman-readable build stage.
program: Utf8PathBufExecutable path; never a shell expression.
args: Vec<String>Individual process arguments.
current_dir: Utf8PathBufWorking directory.
environment: BTreeMap<String, String>Additional environment variables.
redacted_args: BTreeSet<usize>Argument positions hidden from rendered plans and logs.
timeout: DurationMaximum runtime.
Implementations§
Source§impl CommandSpec
impl CommandSpec
Sourcepub fn new(
stage: impl Into<String>,
program: impl Into<Utf8PathBuf>,
current_dir: impl Into<Utf8PathBuf>,
) -> Self
pub fn new( stage: impl Into<String>, program: impl Into<Utf8PathBuf>, current_dir: impl Into<Utf8PathBuf>, ) -> Self
Construct a command with no arguments or environment overrides.
Sourcepub fn redacted_argv(&self) -> Vec<String>
pub fn redacted_argv(&self) -> Vec<String>
Return the executable and arguments with sensitive values removed.
Trait Implementations§
Source§impl Clone for CommandSpec
impl Clone for CommandSpec
Source§impl Debug for CommandSpec
impl Debug for CommandSpec
impl Eq for CommandSpec
Source§impl PartialEq for CommandSpec
impl PartialEq for CommandSpec
impl StructuralPartialEq for CommandSpec
Auto Trait Implementations§
impl Freeze for CommandSpec
impl RefUnwindSafe for CommandSpec
impl Send for CommandSpec
impl Sync for CommandSpec
impl Unpin for CommandSpec
impl UnsafeUnpin for CommandSpec
impl UnwindSafe for CommandSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.