pub struct Invocation {
pub program: String,
pub args: Vec<String>,
pub env: Vec<(String, String)>,
pub cwd: PathBuf,
}Expand description
A runnable command built from a task: what to exec, with what environment, in which directory. The caller runs it however it likes (on a worker, on a thread), keeping execution off any hot path.
Fields§
§program: String§args: Vec<String>§env: Vec<(String, String)>§cwd: PathBufImplementations§
Source§impl Invocation
impl Invocation
Sourcepub fn run(&self) -> Result<ExitStatus>
pub fn run(&self) -> Result<ExitStatus>
Execute the invocation and wait for it, inheriting the parent’s stdio so
the task’s output streams straight through. The CLI wants this, because a
task is an interactive command, not a captured subprocess. An embedder that
must not block a thread, or that wants to capture output, should build the
std::process::Command from the fields itself.
Trait Implementations§
Source§impl Clone for Invocation
impl Clone for Invocation
Source§fn clone(&self) -> Invocation
fn clone(&self) -> Invocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Invocation
impl Debug for Invocation
impl Eq for Invocation
Source§impl PartialEq for Invocation
impl PartialEq for Invocation
impl StructuralPartialEq for Invocation
Auto Trait Implementations§
impl Freeze for Invocation
impl RefUnwindSafe for Invocation
impl Send for Invocation
impl Sync for Invocation
impl Unpin for Invocation
impl UnsafeUnpin for Invocation
impl UnwindSafe for Invocation
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