[][src]Enum interprocess::os::unix::signal::SignalHandler

pub enum SignalHandler {
    Default,
    Ignore,
    Hook(SignalHook),
}

A signal handling method.

Variants

Default

Use the default behavior specified by POSIX.

Ignore

Ignore the signal whenever it is received.

Call a function whenever the signal is received.

Implementations

impl SignalHandler[src]

pub fn is_default(self) -> bool[src]

Returns true for the Default variant, false otherwise.

pub fn is_ignore(self) -> bool[src]

Returns true for the Ignore variant, false otherwise.

pub fn is_hook(self) -> bool[src]

Returns true for the Hook variant, false otherwise.

pub unsafe fn from_fn(function: fn()) -> Self[src]

Creates a handler which calls the specified function.

Safety

The function must not perform any system calls which are not considered signal-safe. See the module-level section on signal-safe system calls for more.

Trait Implementations

impl Clone for SignalHandler[src]

impl Copy for SignalHandler[src]

impl Debug for SignalHandler[src]

impl Default for SignalHandler[src]

fn default() -> Self[src]

impl Eq for SignalHandler[src]

impl From<SignalHook> for SignalHandler[src]

impl PartialEq<SignalHandler> for SignalHandler[src]

impl StructuralEq for SignalHandler[src]

impl StructuralPartialEq for SignalHandler[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.