Skip to main content

ProcessRunError

Enum ProcessRunError 

Source
pub enum ProcessRunError {
    CancelledBeforeSpawn {
        program: PathBuf,
    },
    Spawn {
        program: PathBuf,
        provenance: ExecutableProvenance,
        source: Error,
    },
    MissingPipe {
        program: PathBuf,
        stream: ProcessStream,
    },
    ConfigurePipe {
        program: PathBuf,
        stream: ProcessStream,
        source: Error,
    },
    Poll {
        program: PathBuf,
        source: Error,
    },
    Terminate {
        program: PathBuf,
        source: Error,
    },
    Reap {
        program: PathBuf,
        source: Error,
    },
    Capture {
        program: PathBuf,
        stream: ProcessStream,
        source: Error,
    },
    CleanupDeadline {
        program: PathBuf,
    },
    UnsupportedPlatformGuarantee {
        feature: &'static str,
    },
}
Expand description

Structured failure while starting, supervising, or capturing a child.

Variants§

§

CancelledBeforeSpawn

Cooperative cancellation was already requested before spawn.

Fields

§program: PathBuf

Declared program name/path.

§

Spawn

The child could not be started.

Fields

§program: PathBuf

Declared program name/path.

§provenance: ExecutableProvenance

Executable-selection provenance.

§source: Error

Operating-system error.

§

MissingPipe

A configured pipe was unexpectedly unavailable.

Fields

§program: PathBuf

Declared program name/path.

§stream: ProcessStream

Missing stream.

§

ConfigurePipe

A capture pipe could not be switched to nonblocking mode.

Fields

§program: PathBuf

Declared program name/path.

§stream: ProcessStream

Stream that could not be configured.

§source: Error

Operating-system error.

§

Poll

The child status could not be polled.

Fields

§program: PathBuf

Declared program name/path.

§source: Error

Operating-system error.

§

Terminate

The child process scope could not be terminated during cleanup.

Fields

§program: PathBuf

Declared program name/path.

§source: Error

Operating-system error.

§

Reap

The child could not be reaped.

Fields

§program: PathBuf

Declared program name/path.

§source: Error

Operating-system error.

§

Capture

Draining a child stream failed.

Fields

§program: PathBuf

Declared program name/path.

§stream: ProcessStream

Stream that failed.

§source: Error

Operating-system error.

§

CleanupDeadline

The direct child did not become reapable within the cleanup grace.

Fields

§program: PathBuf

Declared program name/path.

§

UnsupportedPlatformGuarantee

The platform cannot provide the process-tree deadline guarantee.

Fields

§feature: &'static str

Guarantee that is unavailable.

Implementations§

Source§

impl ProcessRunError

Source

pub fn spawn_error_kind(&self) -> Option<ErrorKind>

Return the operating-system error kind when spawning failed.

Trait Implementations§

Source§

impl Debug for ProcessRunError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ProcessRunError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ProcessRunError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.