pub struct SignalSetBuilder { /* private fields */ }Expand description
Constructs a SignalSet using the builder pattern.
Signals that cannot be handled are not listed as methods.
Implementations§
Source§impl SignalSetBuilder
impl SignalSetBuilder
Sourcepub const unsafe fn from_raw(signal_set: Opaque) -> Self
pub const unsafe fn from_raw(signal_set: Opaque) -> Self
Creates a new builder from the raw signal_set.
§Safety
This library assumes that all signals used are valid. Supplying an unsupported signal set invalidates this assumption.
Sourcepub fn termination_set(self) -> Self
pub fn termination_set(self) -> Self
The set of signals that result in process termination.
Sourcepub fn alarm(self) -> Self
pub fn alarm(self) -> Self
The SIGALRM signal; sent when a real-time timer expires.
Default behavior: process termination.
Sourcepub fn child(self) -> Self
pub fn child(self) -> Self
The SIGCHLD signal; sent when the status of a child process changes.
Default behavior: ignored.
Sourcepub fn hangup(self) -> Self
pub fn hangup(self) -> Self
The SIGHUP signal; sent when the terminal is disconnected.
Default behavior: process termination.
Sourcepub fn info(self) -> Self
pub fn info(self) -> Self
The SIGINFO signal; sent to request a status update from the process.
Not supported on: android, emscripten, linux.
Keyboard shortcut: CTRL + T.
Default behavior: ignored.
Sourcepub fn interrupt(self) -> Self
pub fn interrupt(self) -> Self
The SIGINT signal; sent to interrupt a program.
Keyboard shortcut: CTRL + C.
Default behavior: process termination.
Sourcepub fn io(self) -> Self
pub fn io(self) -> Self
The SIGIO signal; sent when I/O operations are possible on some file
descriptor.
Default behavior: ignored.
Sourcepub fn pipe(self) -> Self
pub fn pipe(self) -> Self
The SIGPIPE signal; sent when the process attempts to write to a pipe
which has no reader.
Default behavior: process termination.
Sourcepub fn quit(self) -> Self
pub fn quit(self) -> Self
The SIGQUIT signal; sent to issue a shutdown of the process, after
which the OS will dump the process core.
Keyboard shortcut: CTRL + \.
Default behavior: process termination.
Sourcepub fn terminate(self) -> Self
pub fn terminate(self) -> Self
The SIGTERM signal; sent to issue a shutdown of the process.
Default behavior: process termination.
Sourcepub fn user_defined_1(self) -> Self
pub fn user_defined_1(self) -> Self
The SIGUSR1 signal; a user defined signal.
Default behavior: process termination.
Sourcepub fn user_defined_2(self) -> Self
pub fn user_defined_2(self) -> Self
The SIGUSR2 signal; a user defined signal.
Default behavior: process termination.
Sourcepub fn window_change(self) -> Self
pub fn window_change(self) -> Self
The SIGWINCH signal; sent when the terminal window is resized.
Default behavior: ignored.
Sourcepub fn with(self, signal: SignalKind) -> Self
pub fn with(self, signal: SignalKind) -> Self
Returns self with signal added to it.
Sourcepub fn insert(&mut self, signal: SignalKind)
pub fn insert(&mut self, signal: SignalKind)
Adds signal to self.
Trait Implementations§
Source§impl Clone for SignalSetBuilder
impl Clone for SignalSetBuilder
Source§fn clone(&self) -> SignalSetBuilder
fn clone(&self) -> SignalSetBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for SignalSetBuilder
impl Default for SignalSetBuilder
Source§impl Extend<SignalKind> for SignalSetBuilder
impl Extend<SignalKind> for SignalSetBuilder
Source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = SignalKind>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = SignalKind>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)