Struct signal_hook_mio::v0_7::SignalsInfo [−][src]
A struct which mimics signal_hook::iterator::SignalsInfo
but also allows usage together with MIO runtime.
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]
I: IntoIterator<Item = S>,
S: Borrow<c_int>,
E: Default,
Create a Signals
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]
I: IntoIterator<Item = S>,
S: Borrow<c_int>,
A constructor with specifying an exfiltrator to pass information out of the signal handlers.
pub fn add_signal(&self, signal: c_int) -> Result<(), Error>
[src]
Registers another signal to the set watched by this Signals
instance.
The same restrictions (panics, errors) apply as with
Handle::add_signal
.
pub fn pending(&mut self) -> Pending<E>ⓘNotable traits for Pending<E>
impl<E> Iterator for Pending<E> where
E: Exfiltrator, type Item = <E as Exfiltrator>::Output;
[src]
Notable traits for Pending<E>
impl<E> Iterator for Pending<E> where
E: Exfiltrator, type Item = <E as Exfiltrator>::Output;
Returns an iterator of already received signals.
This returns an iterator over all the signal numbers of the signals received since last
time they were read (out of the set registered by this Signals
instance). Note that they
are returned in arbitrary order and a signal number is returned only once even if it was
received multiple times.
This method returns immediately (does not block) and may produce an empty iterator if there
are no signals ready. So you should register an instance of this struct at an instance of
mio::Poll
to query for readability of the underlying self pipe.
Auto Trait Implementations
impl<E = SignalOnly> !RefUnwindSafe for SignalsInfo<E>
impl<E> Send for SignalsInfo<E>
impl<E> Sync for SignalsInfo<E>
impl<E> Unpin for SignalsInfo<E>
impl<E = SignalOnly> !UnwindSafe for SignalsInfo<E>
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, 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>,