pub struct KillSignal(/* private fields */);Expand description
Used to send signals to commands.
Implementations§
Source§impl KillSignal
impl KillSignal
Sourcepub fn aborted_code(&self) -> Option<i32>
pub fn aborted_code(&self) -> Option<i32>
Exit code to use when aborted.
Sourcepub fn child_signal(&self) -> Self
pub fn child_signal(&self) -> Self
Creates a signal that will only send signals to itself and all descendants–not the parent signal.
Sourcepub fn drop_guard(self) -> KillSignalDropGuard
pub fn drop_guard(self) -> KillSignalDropGuard
Creates a DropKillSignalGuard that will send a SignalKind::SIGTERM on drop.
Sourcepub fn drop_guard_with_kind(self, kind: SignalKind) -> KillSignalDropGuard
pub fn drop_guard_with_kind(self, kind: SignalKind) -> KillSignalDropGuard
Creates a DropKillSignalGuard that will send the specified signal on drop.
Sourcepub fn send(&self, signal: SignalKind)
pub fn send(&self, signal: SignalKind)
Send a signal to commands being run.
Sourcepub async fn wait_aborted(&self) -> SignalKind
pub async fn wait_aborted(&self) -> SignalKind
Waits for only signals deemed to abort a command.
Sourcepub async fn wait_any(&self) -> SignalKind
pub async fn wait_any(&self) -> SignalKind
Waits for any signal to be received.
Trait Implementations§
Source§impl Clone for KillSignal
impl Clone for KillSignal
Source§fn clone(&self) -> KillSignal
fn clone(&self) -> KillSignal
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KillSignal
impl Debug for KillSignal
Auto Trait Implementations§
impl Freeze for KillSignal
impl !RefUnwindSafe for KillSignal
impl !Send for KillSignal
impl !Sync for KillSignal
impl Unpin for KillSignal
impl !UnwindSafe for KillSignal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more