pub struct RunOptions { /* private fields */ }Expand description
The settings of one run: the child’s input, what it keeps of each
output stream, when and how it stops the child, and the child’s scope.
A RunOptions value that delivers a stream as lines serves one run,
because the run ends the line queue when it returns.
The default reads nothing, keeps nothing, has no deadline and no cancel, kills at once when it stops the child, and starts the child in a group of its own.
Implementations§
Source§impl RunOptions
impl RunOptions
Sourcepub fn stdout(self, capture: Capture) -> Self
pub fn stdout(self, capture: Capture) -> Self
Sets what the run keeps of the child’s standard output.
Sourcepub fn stderr(self, capture: Capture) -> Self
pub fn stderr(self, capture: Capture) -> Self
Sets what the run keeps of the child’s standard error.
Sourcepub const fn deadline(self, deadline: Instant) -> Self
pub const fn deadline(self, deadline: Instant) -> Self
Sets the time at which the run stops a child that has not exited,
which then ends as Outcome::TimedOut.
Sourcepub fn cancel(self, cancel: &Cancel) -> Self
pub fn cancel(self, cancel: &Cancel) -> Self
Makes the run watch cancel, so Cancel::cancel stops it.
Sourcepub fn escalation(self, escalation: Escalation) -> Self
pub fn escalation(self, escalation: Escalation) -> Self
Sets the steps that stop the child.
Trait Implementations§
Source§impl Clone for RunOptions
impl Clone for RunOptions
Source§impl Debug for RunOptions
impl Debug for RunOptions
Auto Trait Implementations§
impl Forget for RunOptions
impl Freeze for RunOptions
impl RefUnwindSafe for RunOptions
impl Send for RunOptions
impl Sync for RunOptions
impl Unpin for RunOptions
impl UnsafeUnpin for RunOptions
impl UnwindSafe for RunOptions
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