[][src]Struct signal_hook_tokio::SignalsInfo

pub struct SignalsInfo<E: Exfiltrator = SignalOnly>(_);

An asynchronous Stream of arriving signals.

The stream doesn't return the signals in the order they were recieved by the process and may merge signals received multiple times.

Implementations

impl<E: Exfiltrator> SignalsInfo<E>[src]

pub fn new<I, S>(signals: I) -> Result<Self, Error> where
    I: IntoIterator<Item = S>,
    S: Borrow<c_int>,
    E: Default
[src]

Create a SignalsInfo instance.

This registers all the signals listed. The same restrictions (panics, errors) apply as with Handle::add_signal.

pub fn with_exfiltrator<I, S>(signals: I, exfiltrator: E) -> Result<Self, Error> where
    I: IntoIterator<Item = S>,
    S: Borrow<c_int>, 
[src]

A constructor with explicit exfiltrator.

pub fn handle(&self) -> Handle[src]

Get a shareable Handle for this Signals instance.

This can be used to add further signals or close the Signals instance which terminates the whole signal stream.

Auto Trait Implementations

impl<E = SignalOnly> !RefUnwindSafe for SignalsInfo<E>[src]

impl<E> Send for SignalsInfo<E>[src]

impl<E> Sync for SignalsInfo<E>[src]

impl<E> Unpin for SignalsInfo<E>[src]

impl<E = SignalOnly> !UnwindSafe for SignalsInfo<E>[src]

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, 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.