[][src]Struct process_control::_OutputTimeout

pub struct _OutputTimeout { /* fields omitted */ }

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

impl Debug for _OutputTimeout[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.