Struct calloop::signals::Signals [−][src]
pub struct Signals { /* fields omitted */ }An event source for receiving Unix signals
Methods
impl Signals[src]
impl Signalspub fn new(signals: &[Signal]) -> Result<Signals>[src]
pub fn new(signals: &[Signal]) -> Result<Signals>Create a new signal event source listening on the specified list of signals
pub fn add_signals(&mut self, signals: &[Signal]) -> Result<()>[src]
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.
pub fn remove_signals(&mut self, signals: &[Signal]) -> Result<()>[src]
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.
pub fn set_signals(&mut self, signals: &[Signal]) -> Result<()>[src]
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
impl Drop for Signals[src]
impl Drop for Signalsimpl Evented for Signals[src]
impl Evented for Signalsfn register(
&self,
poll: &Poll,
token: Token,
interest: Ready,
opts: PollOpt
) -> Result<()>[src]
fn register(
&self,
poll: &Poll,
token: Token,
interest: Ready,
opts: PollOpt
) -> Result<()>Register self with the given Poll instance. Read more
fn reregister(
&self,
poll: &Poll,
token: Token,
interest: Ready,
opts: PollOpt
) -> Result<()>[src]
fn reregister(
&self,
poll: &Poll,
token: Token,
interest: Ready,
opts: PollOpt
) -> Result<()>Re-register self with the given Poll instance. Read more
fn deregister(&self, poll: &Poll) -> Result<()>[src]
fn deregister(&self, poll: &Poll) -> Result<()>Deregister self from the given Poll instance Read more
impl EventSource for Signals[src]
impl EventSource for Signalstype Event = Event
The type of events generated by your sources
fn interest(&self) -> Ready[src]
fn interest(&self) -> ReadyThe interest value that will be given to mio when registering your source
fn pollopts(&self) -> PollOpt[src]
fn pollopts(&self) -> PollOptThe pollopt value that will be given to mio when registering your source
fn make_dispatcher<Data: 'static, F: FnMut(Event, &mut Data) + 'static>(
&self,
callback: F
) -> Rc<RefCell<EventDispatcher<Data>>>[src]
fn make_dispatcher<Data: 'static, F: FnMut(Event, &mut Data) + 'static>(
&self,
callback: F
) -> Rc<RefCell<EventDispatcher<Data>>>Wrap an user callback into a dispatcher, that will convert an mio readiness into an event Read more