[−][src]Struct mapped_command::OpaqueOsExitStatus
A platform specific opaque exit status.
An exit status which is not an exit code, e.g. on unix the signal which terminated an process preventing it from exiting with an exit status.
Warning: Besides OpaqueOsExitStatus::target_specific_default()
all other methods only exist on some targets but not all. As such
using them can lead to code which only compiles on some targets.
Implementations
impl OpaqueOsExitStatus
[src]
pub fn target_specific_default() -> Self
[src]
Creates a instance of this type.
This is meant for allowing non-platform specific tests which handle the case of a non exit code process exit status.
Platform specific tests likely still are needed as what this type means is platform specific.
This will always create the same default value but it's
a target_specific_value and it's picked arbitrary so
it's not really appropriately to implement Default
.
(To make clear why it isn't consider u32
would default
to 246
or similar arbitrary value.)
pub fn signal_number(&self) -> i32
[src]
Return the signal number which did lead to the process termination.
pub fn from_signal_number(signal: i32) -> Self
[src]
Create a unix OpaqueOsExitStatus
instance based on the signal code
causing the non exit code termination.
Like some other aspects you can define (and test) unrealistic signal numbers. IMHO this is better (more simple, flexible etc.) then to have a result which is potentially target dependent or a implicit target dependent bit masking.
Trait Implementations
impl Clone for OpaqueOsExitStatus
[src]
fn clone(&self) -> OpaqueOsExitStatus
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for OpaqueOsExitStatus
[src]
impl Debug for OpaqueOsExitStatus
[src]
impl Display for OpaqueOsExitStatus
[src]
impl Eq for OpaqueOsExitStatus
[src]
impl From<OpaqueOsExitStatus> for ExitStatus
[src]
fn from(ooes: OpaqueOsExitStatus) -> Self
[src]
impl Hash for OpaqueOsExitStatus
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<OpaqueOsExitStatus> for OpaqueOsExitStatus
[src]
fn eq(&self, other: &OpaqueOsExitStatus) -> bool
[src]
fn ne(&self, other: &OpaqueOsExitStatus) -> bool
[src]
impl StructuralEq for OpaqueOsExitStatus
[src]
impl StructuralPartialEq for OpaqueOsExitStatus
[src]
Auto Trait Implementations
impl RefUnwindSafe for OpaqueOsExitStatus
[src]
impl Send for OpaqueOsExitStatus
[src]
impl Sync for OpaqueOsExitStatus
[src]
impl Unpin for OpaqueOsExitStatus
[src]
impl UnwindSafe for OpaqueOsExitStatus
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,