[][src]Struct signal_hook::iterator::exfiltrator::origin::Origin

pub struct Origin {
    pub signal: c_int,
    pub process: Option<Process>,
    pub cause: Cause,
}

Information about a signal and its origin.

This is produced by the WithOrigin exfiltrator. See the example there.

Fields

signal: c_int

The signal that happened.

process: Option<Process>

Information about the process that caused the signal.

Note that not all signals are caused by a specific process or have the information available („fault“ signals like SIGBUS don't have, any signal may be sent by the kernel instead of a specific process).

This is filled in whenever available. For most signals, this is the process that sent the signal (by kill or similar), for SIGCHLD it is the child that caused the signal.

cause: Cause

How the signal happened.

This is a best-effort value. In particular, some systems may have causes not known to this library. Some other systems (MacOS) does not fill the value in so there's no way to know. In all these cases, this will contain Cause::Unknown.

Some values are platform specific and not available on other systems.

Future versions may enrich the enum by further values.

Trait Implementations

impl Clone for Origin[src]

impl Debug for Origin[src]

impl Eq for Origin[src]

impl PartialEq<Origin> for Origin[src]

impl StructuralEq for Origin[src]

impl StructuralPartialEq for Origin[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.