#[repr(i32)]pub enum TerminationOutcome {
Unspecified = 0,
NaturalExit = 1,
SoftExit = 2,
HardKilled = 3,
}Expand description
How a session reached its terminal state. Reported on
PtySessionInfo/PipeSessionInfo/GetSessionBacklogResponse once
exited=true. Useful for understanding whether the soft signal
worked or whether the daemon had to escalate to a hard kill.
Variants§
Unspecified = 0
Default for live sessions and pre-#130 callers.
NaturalExit = 1
The child exited on its own. No terminate RPC fired before exit.
SoftExit = 2
Terminate RPC fired; child exited within the grace window before the daemon issued the hard kill. The soft signal worked.
HardKilled = 3
Terminate RPC fired; child did not exit within the grace window; the daemon’s hard kill ran.
Implementations§
Source§impl TerminationOutcome
impl TerminationOutcome
Sourcepub fn from_i32(value: i32) -> Option<TerminationOutcome>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<TerminationOutcome>
Use the TryFrom<i32> implementation instead
Converts an i32 to a TerminationOutcome, or None if value is not a valid variant.
Source§impl TerminationOutcome
impl TerminationOutcome
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for TerminationOutcome
impl Clone for TerminationOutcome
Source§fn clone(&self) -> TerminationOutcome
fn clone(&self) -> TerminationOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TerminationOutcome
impl Debug for TerminationOutcome
Source§impl Default for TerminationOutcome
impl Default for TerminationOutcome
Source§fn default() -> TerminationOutcome
fn default() -> TerminationOutcome
Source§impl From<TerminationOutcome> for i32
impl From<TerminationOutcome> for i32
Source§fn from(value: TerminationOutcome) -> i32
fn from(value: TerminationOutcome) -> i32
Source§impl Hash for TerminationOutcome
impl Hash for TerminationOutcome
Source§impl Ord for TerminationOutcome
impl Ord for TerminationOutcome
Source§fn cmp(&self, other: &TerminationOutcome) -> Ordering
fn cmp(&self, other: &TerminationOutcome) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for TerminationOutcome
impl PartialEq for TerminationOutcome
Source§fn eq(&self, other: &TerminationOutcome) -> bool
fn eq(&self, other: &TerminationOutcome) -> bool
self and other values to be equal, and is used by ==.