RawExitCode

Trait RawExitCode 

Source
pub trait RawExitCode:
    Clone
    + Copy
    + Debug
    + PartialEq
    + Eq {
    type Code: PrimInt + Display;

    // Required methods
    fn from_raw(code: Self::Code) -> Self;
    fn to_raw(&self) -> Self::Code;

    // Provided methods
    fn is_success(&self) -> bool { ... }
    fn is_failure(&self) -> bool { ... }
}
Expand description

A trait that represents a raw platform-specific exit code.

Required Associated Types§

Source

type Code: PrimInt + Display

Underlying code type.

Required Methods§

Source

fn from_raw(code: Self::Code) -> Self

Create a RawExitCode from the underlying code.

Source

fn to_raw(&self) -> Self::Code

Returns the underlying code.

Provided Methods§

Source

fn is_success(&self) -> bool

Returns whether the exit status indicates success.

Source

fn is_failure(&self) -> bool

Returns whether the exit status indicates failure.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl RawExitCode for proc_result::unix::ExitCode

Source§

impl RawExitCode for proc_result::windows::ExitCode