[−][src]Struct mio_signals::SignalSet
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));
Methods
impl SignalSet
[src]
pub const fn all() -> SignalSet
[src]
Create a new set with all signals.
pub const fn len(self) -> usize
[src]
Number of signals in the set.
pub fn contains<S>(self, other: S) -> bool where
S: Into<SignalSet>,
[src]
S: Into<SignalSet>,
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
impl BitOr<Signal> for SignalSet
[src]
type Output = SignalSet
The resulting type after applying the |
operator.
fn bitor(self, rhs: Signal) -> Self
[src]
impl BitOr<SignalSet> for SignalSet
[src]
type Output = SignalSet
The resulting type after applying the |
operator.
fn bitor(self, rhs: Self) -> Self
[src]
impl BitOr<SignalSet> for Signal
[src]
type Output = SignalSet
The resulting type after applying the |
operator.
fn bitor(self, rhs: SignalSet) -> SignalSet
[src]
impl Clone for SignalSet
[src]
impl Copy for SignalSet
[src]
impl Debug for SignalSet
[src]
impl Eq for SignalSet
[src]
impl From<Signal> for SignalSet
[src]
impl Hash for SignalSet
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl IntoIterator for SignalSet
[src]
type Item = Signal
The type of the elements being iterated over.
type IntoIter = SignalSetIter
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl Ord for SignalSet
[src]
fn cmp(&self, other: &SignalSet) -> Ordering
[src]
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<SignalSet> for SignalSet
[src]
impl PartialOrd<SignalSet> for SignalSet
[src]
fn partial_cmp(&self, other: &SignalSet) -> Option<Ordering>
[src]
fn lt(&self, other: &SignalSet) -> bool
[src]
fn le(&self, other: &SignalSet) -> bool
[src]
fn gt(&self, other: &SignalSet) -> bool
[src]
fn ge(&self, other: &SignalSet) -> bool
[src]
impl StructuralEq for SignalSet
[src]
impl StructuralPartialEq for SignalSet
[src]
Auto Trait Implementations
impl RefUnwindSafe for SignalSet
impl Send for SignalSet
impl Sync for SignalSet
impl Unpin for SignalSet
impl UnwindSafe for SignalSet
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,
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<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,