pub struct ExecaCommand { /* private fields */ }Expand description
An exact-argv command. Await it directly or call spawn() to stream output.
Implementations§
Source§impl ExecaCommand
impl ExecaCommand
pub fn with_options(self, options: Options) -> Self
pub fn reject(self, value: bool) -> Self
pub fn all(self, value: bool) -> Self
pub fn buffer(self, value: bool) -> Self
pub fn strip_final_newline(self, value: bool) -> Self
pub fn max_buffer(self, value: usize) -> Self
pub fn input(self, input: impl Into<Vec<u8>>) -> Self
pub fn cwd(self, cwd: impl Into<PathBuf>) -> Self
pub fn timeout(self, timeout: Duration) -> Self
pub fn cancel_signal(self, signal: CancelSignal) -> Self
pub fn spawn(self) -> Subprocess
pub async fn run(self) -> ExecaOutcome
Sourcepub fn sync(self) -> ExecaOutcome
pub fn sync(self) -> ExecaOutcome
Run outside a Tokio runtime. Async callers should await the command.
Sourcepub async fn pipe(self, destination: ExecaCommand) -> ExecaOutcome
pub async fn pipe(self, destination: ExecaCommand) -> ExecaOutcome
Pass captured stdout as exact input to the next command. This convenience is buffered; use the native Pipeline API for a streaming Rust pipeline.
Trait Implementations§
Source§impl Clone for ExecaCommand
impl Clone for ExecaCommand
Source§impl Debug for ExecaCommand
impl Debug for ExecaCommand
Source§impl IntoFuture for ExecaCommand
impl IntoFuture for ExecaCommand
Source§type Output = Result<ExecaResult, ExecaError>
type Output = Result<ExecaResult, ExecaError>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <ExecaCommand as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <ExecaCommand as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ExecaCommand
impl !UnwindSafe for ExecaCommand
impl Freeze for ExecaCommand
impl Send for ExecaCommand
impl Sync for ExecaCommand
impl Unpin for ExecaCommand
impl UnsafeUnpin for ExecaCommand
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.