[][src]Struct pakr_mio_signalfd::SignalFd

pub struct SignalFd { /* fields omitted */ }

SignalFd can be used to create mio-compatible signal handlers.

Implementations

impl SignalFd[src]

pub fn new(sigset: &SigSet) -> Result<Self>[src]

Create a new signalfd watching the given signal set.

pub fn read(&self) -> Result<Option<SigInfo>>[src]

Acknowledges received signal. It must be called after catching signal to acknowlege that signal. If you don't read, the same signal is re-issued on the next poll iteration.

Returns:

  • Ok(None) - if there was no signal waiting (SignalFd is opened as NONBLOCK)
  • Ok(Some(SigInfo)) - if there was pending signal information
  • Err(...) - if there was error reading signal information

Trait Implementations

impl AsRawFd for SignalFd[src]

impl Drop for SignalFd[src]

impl Source for SignalFd[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, 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.