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

pub struct WithOrigin;

The Exfiltrator that produces Origin of signals.

Examples

// Subscribe to SIGUSR1, with information about the process.
let signals = SignalsInfo::<WithOrigin>::new(&[SIGUSR1])?;

// Send a signal to ourselves.
let my_pid = unsafe { libc::getpid() };
unsafe { libc::kill(my_pid, SIGUSR1) };

// Grab the signal and look into the details.
let received = signals.forever().next().unwrap();

assert_eq!(SIGUSR1, received.signal);
assert_eq!(my_pid, received.process.unwrap().pid);

Trait Implementations

impl Clone for WithOrigin[src]

impl Copy for WithOrigin[src]

impl Debug for WithOrigin[src]

impl Default for WithOrigin[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<E> Exfiltrator for E where
    E: Exfiltrator, 
[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.