pub struct WaitForCommand { /* private fields */ }Expand description
Waiting for a command, from CommandHandle::wait; awaited, its result
once it exits. Dropped, it stops the waiting, not the command.
Implementations§
Source§impl WaitForCommand
impl WaitForCommand
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Once it passes, the command is killed (SIGKILL), and its result says so.
Sourcepub fn on_stdout(self, callback: impl FnMut(&str) + Send + 'static) -> Self
pub fn on_stdout(self, callback: impl FnMut(&str) + Send + 'static) -> Self
Its output from its start, as it’s written.
pub fn on_stderr(self, callback: impl FnMut(&str) + Send + 'static) -> Self
Trait Implementations§
Source§impl IntoFuture for WaitForCommand
impl IntoFuture for WaitForCommand
Source§type Output = Result<CommandResult, Error>
type Output = Result<CommandResult, Error>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = Result<CommandResult, Error>> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = Result<CommandResult, Error>> + 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 WaitForCommand
impl !Sync for WaitForCommand
impl !UnwindSafe for WaitForCommand
impl Forget for WaitForCommand
impl Freeze for WaitForCommand
impl Send for WaitForCommand
impl Unpin for WaitForCommand
impl UnsafeUnpin for WaitForCommand
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