Struct mio_signals::SignalSet [−][src]
pub struct SignalSet(_);
Expand description
Set of Signal
s used in registering signal notifications with Signals
.
Examples
use mio_signals::{Signal, SignalSet};
// Signal set can be created by bit-oring (`|`) signals together.
let set: SignalSet = Signal::Interrupt | Signal::Quit;
assert_eq!(set.len(), 2);
assert!(set.contains(Signal::Interrupt));
assert!(set.contains(Signal::Quit));
assert!(!set.contains(Signal::Terminate));
assert!(set.contains(Signal::Interrupt | Signal::Quit));
Implementations
Whether or not all signals in other
are contained within self
.
Notes
This can also be used with Signal
.
Examples
use mio_signals::{Signal, SignalSet};
let set = SignalSet::all();
assert!(set.contains(Signal::Interrupt));
assert!(set.contains(Signal::Quit));
assert!(set.contains(Signal::Interrupt | Signal::Quit));
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for SignalSet
impl UnwindSafe for SignalSet
Blanket Implementations
Mutably borrows from an owned value. Read more