#[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 more