[][src]Struct pakr_signals::SigSet

pub struct SigSet(_);

A wrapper for libc::sigset_t

Implementations

impl SigSet[src]

pub fn new() -> Self[src]

Create new, empty SigSet

pub fn clear(&mut self) -> &mut Self[src]

Clear all signals in SigSet

pub fn fill(&mut self) -> &mut Self[src]

Set all signals in SigSet

pub fn add(&mut self, sig: Sig) -> &mut Self[src]

Add a signle Sig to SigSet.

Re-adding already existing signal does nothing.

pub fn add_many(&mut self, sigs: &[Sig]) -> &mut Self[src]

Add a list of Sigs to SigSet.

Re-adding already existing signals does nothing.

pub fn remove(&mut self, sig: Sig) -> &mut Self[src]

Remove a signle Sig from SigSet.

Removing already removed signal does nothing.

pub fn remove_many(&mut self, sigs: &[Sig]) -> &mut Self[src]

Remove a list of Sigs from SigSet.

Removing already removed signals does nothing.

pub fn has(&self, sig: Sig) -> bool[src]

Check if Signal is present in SigSet

pub fn has_any(&self, sigs: &[Sig]) -> bool[src]

Check if SigSet has any of Signals from the list set

pub fn has_all(&self, sigs: &[Sig]) -> bool[src]

Check if SigSet has all of Signals from the list set

pub fn disable_default_handler(&self) -> Result<()>[src]

Detach SigSet from default handlers.

Specified signals are ignored by runtime but can be handled by user-defined handlers, for example by [mio-signalfd].

pub fn enable_default_handler(&self) -> Result<()>[src]

Attach a SigSet to default handlers.

Specified signals are handled by runtime according to default rules, which may prevent signal from reaching user-defined handler.

pub fn from(sigs: &[Sig]) -> Self[src]

Create SigSet pre-populated with list of Sigs

pub fn as_ptr(&self) -> *const sigset_t[src]

Expose as const pointer to underlying libc::sigset_t

pub fn as_mut_ptr(&mut self) -> *mut sigset_t[src]

Expose as mut pointer to underlying libc::sigset_t

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
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.