pub struct Signals { /* private fields */ }
Expand description
An event source for receiving Unix signals
Implementations
sourceimpl Signals
impl Signals
sourcepub fn new(signals: &[Signal]) -> Result<Signals>
pub fn new(signals: &[Signal]) -> Result<Signals>
Create a new signal event source listening on the specified list of signals
sourcepub fn add_signals(&mut self, signals: &[Signal]) -> Result<()>
pub fn add_signals(&mut self, signals: &[Signal]) -> Result<()>
Add a list of signals to the signals source
If this function returns an error, the signal mask of the thread may have still been changed.
sourcepub fn remove_signals(&mut self, signals: &[Signal]) -> Result<()>
pub fn remove_signals(&mut self, signals: &[Signal]) -> Result<()>
Remove a list of signals to the signals source
If this function returns an error, the signal mask of the thread may have still been changed.
sourcepub fn set_signals(&mut self, signals: &[Signal]) -> Result<()>
pub fn set_signals(&mut self, signals: &[Signal]) -> Result<()>
Replace the list of signals of the source
If this function returns an error, the signal mask of the thread may have still been changed.
Trait Implementations
sourceimpl EventSource for Signals
impl EventSource for Signals
sourcefn interest(&self) -> Ready
fn interest(&self) -> Ready
The interest value that will be given to
mio
when registering your sourcesourcefn pollopts(&self) -> PollOpt
fn pollopts(&self) -> PollOpt
The pollopt value that will be given to
mio
when registering your sourcesourcefn make_dispatcher<Data: 'static, F: FnMut(Event, &mut Data) + 'static>(
&self,
callback: F
) -> Rc<RefCell<dyn EventDispatcher<Data>>>
fn make_dispatcher<Data: 'static, F: FnMut(Event, &mut Data) + 'static>(
&self,
callback: F
) -> Rc<RefCell<dyn EventDispatcher<Data>>>
Wrap an user callback into a dispatcher, that will convert an
mio
readiness
into an event Read moreAuto Trait Implementations
impl !RefUnwindSafe for Signals
impl !Send for Signals
impl !Sync for Signals
impl Unpin for Signals
impl !UnwindSafe for Signals
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more