Struct SigSet
struct SigSet { ... }
Specifies a set of Signals that may be blocked, waited for, etc.
Implementations
impl SigSet
fn all() -> SigSetInitialize to include all signals.
fn empty() -> SigSetInitialize 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) -> boolReturn 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 returnsOk. Ifsigsuspend(2)set other error, this function returnsErr.For more information see the
sigsuspend(2).unsafe fn from_sigset_t_unchecked(sigset: sigset_t) -> SigSetConverts a
libc::sigset_tobject to aSigSetwithout checking whether thelibc::sigset_tis already initialized.Safety
The
sigsetpassed in must be a valid an initializedlibc::sigset_tby calling eithersigemptyset(3)orsigfillset(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) -> TReturns the argument unchanged.
impl<T> ToOwned for SigSet
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for SigSet
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses 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>