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§
Required Methods§
Sourcefn from_raw(code: Self::Code) -> Self
fn from_raw(code: Self::Code) -> Self
Create a RawExitCode
from the underlying code.
Provided Methods§
Sourcefn is_success(&self) -> bool
fn is_success(&self) -> bool
Returns whether the exit status indicates success.
Sourcefn is_failure(&self) -> bool
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.