[−][src]Struct process_control::_OutputTimeout
A temporary wrapper for a process timeout.
Do not use this type explicitly. It is not part of the backward compatibility guarantee of this crate. Only its methods should be used.
Methods
impl _OutputTimeout[src]
#[must_use]
pub fn terminating(self) -> Self[src]
Causes the process to be terminated if it exceeds the time limit.
Errors terminating the process will be ignored, as they are
often less important than the result. To catch those errors,
ProcessTerminator::terminate should be called explicitly
instead.
pub fn wait(self) -> IoResult<Option<Output>>[src]
Runs the process to completion, aborting if it exceeds the time limit.
A separate thread will be created to wait on the process without blocking the current thread.
If the time limit is exceeded before the process finishes,
Ok(None) will be returned. However, the process will not be
terminated in that case unless terminating is called
beforehand. It is recommended to always call that method to
allow system resources to be freed.
The stdin handle to the process, if it exists, will be closed before waiting. Otherwise, the process would be guaranteed to time out.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for _OutputTimeout
impl Send for _OutputTimeout
impl Sync for _OutputTimeout
impl Unpin for _OutputTimeout
impl UnwindSafe for _OutputTimeout
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,