Struct SigSet

struct SigSet { ... }

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

Implementations

impl SigSet

fn all() -> SigSet

Initialize to include all signals.

fn empty() -> SigSet

Initialize to include nothing.

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

Add the specified signal to the set.

fn clear(self: &mut Self)

Remove all signals from this set.

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

Remove the specified signal from this set.

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

Return whether this set includes the specified signal.

fn iter(self: &Self) -> SigSetIter<'_>

Returns an iterator that yields the signals contained in this set.

fn thread_get_mask() -> Result<SigSet>

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

fn thread_set_mask(self: &Self) -> Result<()>

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

fn thread_block(self: &Self) -> Result<()>

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

fn thread_unblock(self: &Self) -> Result<()>

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

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

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

fn wait(self: &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.

fn suspend(self: &Self) -> Result<()>

Wait for a signal

Return value

If sigsuspend(2) is interrupted (EINTR), this function returns Ok. If sigsuspend(2) set other error, this function returns Err.

For more information see the sigsuspend(2).

unsafe fn from_sigset_t_unchecked(sigset: sigset_t) -> SigSet

Converts a libc::sigset_t object to a SigSet without checking whether the libc::sigset_t is already initialized.

Safety

The sigset passed in must be a valid an initialized libc::sigset_t by calling either sigemptyset(3) or sigfillset(3). Otherwise, the results are undefined.

impl AsRef for SigSet

fn as_ref(self: &Self) -> &sigset_t

impl BitOr for SigSet

fn bitor(self: Self, rhs: Self) -> <Self as >::Output

impl BitOr for SigSet

fn bitor(self: Self, rhs: Signal) -> <Self as >::Output

impl Clone for SigSet

fn clone(self: &Self) -> SigSet

impl Copy for SigSet

impl Debug for SigSet

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Eq for SigSet

impl Extend for SigSet

fn extend<T>(self: &mut Self, iter: T)
where
    T: IntoIterator<Item = Signal>

impl Freeze for SigSet

impl From for SigSet

fn from(signal: Signal) -> SigSet

impl FromIterator for SigSet

fn from_iter<T>(iter: T) -> Self
where
    T: IntoIterator<Item = Signal>

impl Hash for SigSet

fn hash<H: Hasher>(self: &Self, state: &mut H)

impl PartialEq for SigSet

fn eq(self: &Self, other: &Self) -> bool

impl RefUnwindSafe for SigSet

impl Send for SigSet

impl Sync for SigSet

impl Unpin for SigSet

impl UnsafeUnpin for SigSet

impl UnwindSafe for SigSet

impl<T> Any for SigSet

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for SigSet

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for SigSet

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for SigSet

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for SigSet

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for SigSet

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for SigSet

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for SigSet

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for SigSet

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>