pub enum StopSignal {
Interrupt,
Terminate,
}Expand description
A signal asking the process to stop.
Variants§
Interrupt
SIGINT, sent by an interactive terminal on Ctrl+C.
Terminate
SIGTERM, sent by service managers and container runtimes.
Implementations§
Source§impl StopSignal
impl StopSignal
Sourcepub fn exit_code(self) -> i32
pub fn exit_code(self) -> i32
The exit status conventionally associated with this signal.
That status is 128 + the signal number (SIGINT is 2, SIGTERM is 15), which is what a
shell or a container runtime reports when a signal terminates a process. Exiting with it
is not the same outcome as being terminated by the signal, which a supervisor can tell
apart, but it is the number tooling already reads as “stopped by an operator”.
Trait Implementations§
Source§impl Clone for StopSignal
impl Clone for StopSignal
impl Copy for StopSignal
Source§impl Debug for StopSignal
impl Debug for StopSignal
Source§impl Display for StopSignal
impl Display for StopSignal
impl Eq for StopSignal
Source§impl PartialEq for StopSignal
impl PartialEq for StopSignal
impl StructuralPartialEq for StopSignal
Auto Trait Implementations§
impl Freeze for StopSignal
impl RefUnwindSafe for StopSignal
impl Send for StopSignal
impl Sync for StopSignal
impl Unpin for StopSignal
impl UnsafeUnpin for StopSignal
impl UnwindSafe for StopSignal
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.