[][src]Struct process_control::_ExitStatusTimeout

pub struct _ExitStatusTimeout<'a> { /* 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<'a> _ExitStatusTimeout<'a>[src]

#[must_use] pub fn strict_errors(self) -> Self[src]

Causes wait to never suppress an error.

Typically, errors terminating the process will be ignored, as they are often less important than the result. However, when this method is called, these errors will be returned as well.

#[must_use] pub fn terminating(self) -> Self[src]

Causes the process to be terminated if it exceeds the time limit.

Process identifier reuse by the system will be mitigated. There should never be a scenario that causes an unintended process to be terminated.

pub fn wait(self) -> IoResult<Option<ExitStatus>>[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.

This method cannot guarantee that the same ErrorKind variants will be returned in the future for the same type of failure. Allowing these breakages is required to be compatible with the Error type.

Trait Implementations

impl<'a> Debug for _ExitStatusTimeout<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for _ExitStatusTimeout<'a>

impl<'a> Send for _ExitStatusTimeout<'a>

impl<'a> Sync for _ExitStatusTimeout<'a>

impl<'a> Unpin for _ExitStatusTimeout<'a>

impl<'a> !UnwindSafe for _ExitStatusTimeout<'a>

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.