pub struct Run { /* 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 Run 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 Run
impl Run
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 Exit::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§
Auto Trait Implementations§
impl Forget for Run
impl Freeze for Run
impl RefUnwindSafe for Run
impl Send for Run
impl Sync for Run
impl Unpin for Run
impl UnsafeUnpin for Run
impl UnwindSafe for Run
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