Struct nix::sys::signal::SigSet

pub struct SigSet { /* fields hidden */ }
Documentation

Specifies a set of Signals that may be blocked, waited for, etc.

Implementations

impl SigSet
pub fn all() -> SigSet

Initialize to include all signals.

pub fn empty() -> SigSet

Initialize to include nothing.

pub fn add(&mut Self, signal: Signal)

Add the specified signal to the set.

pub fn clear(&mut Self)

Remove all signals from this set.

pub fn remove(&mut Self, signal: Signal)

Remove the specified signal from this set.

pub fn contains(&Self, signal: Signal) -> bool

Return whether this set includes the specified signal.

pub fn extend(&mut Self, other: &SigSet)

Merge all of other’s signals into this set.

pub fn thread_get_mask() -> Result<SigSet>

Gets the currently blocked (masked) set of signals for the calling thread.

pub fn thread_set_mask(&Self) -> Result<()>

Sets the set of signals as the signal mask for the calling thread.

pub fn thread_block(&Self) -> Result<()>

Adds the set of signals to the signal mask for the calling thread.

pub fn thread_unblock(&Self) -> Result<()>

Removes the set of signals from the signal mask for the calling thread.

pub fn thread_swap_mask(&Self, how: SigmaskHow) -> Result<SigSet>

Sets the set of signals as the signal mask, and returns the old mask.

pub fn wait(&Self) -> Result<Signal>

Suspends execution of the calling thread until one of the signals in the signal mask becomes pending, and returns the accepted signal.

Trait Implementations

impl AsRef<sigset_t> for SigSet
fn as_ref(&Self) -> &libc::sigset_t
impl Clone for SigSet
fn clone(&Self) -> SigSet
impl Copy for SigSet
impl Debug for SigSet
fn fmt(&Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Eq for SigSet
impl Hash for SigSet
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()
impl PartialEq<SigSet> for SigSet
fn eq(&Self, other: &SigSet) -> bool
fn ne(&Self, other: &SigSet) -> bool
impl StructuralEq for SigSet

Auto Trait Implementations

impl RefUnwindSafe for SigSet
impl Send for SigSet
impl Sync for SigSet
impl Unpin for SigSet
impl UnwindSafe for SigSet

Blanket Implementations

impl<T> Any for T
where
    T: 'static + ?Sized,
fn type_id(&Self) -> TypeId
impl<T> Borrow<T> for T
where
    T: ?Sized,
fn borrow(&Self) -> &T
impl<T> BorrowMut<T> for T
where
    T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T
impl<T> From<T> for T
fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for T
where
    U: From<T>,
fn into(Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

impl<T> ToOwned for T
where
    T: Clone,
type Owned = T
fn to_owned(&Self) -> T
fn clone_into(&Self, target: &mut T)
impl<T, U> TryFrom<U> for T
where
    U: Into<T>,
type Error = Infallible
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for T
where
    U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
fn try_into(Self) -> Result<U, <U as TryFrom<T>>::Error>