#[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 moreimpl Copy for TerminationOutcome
Source§impl Debug for TerminationOutcome
impl Debug for TerminationOutcome
Source§impl Default for TerminationOutcome
impl Default for TerminationOutcome
Source§fn default() -> TerminationOutcome
fn default() -> TerminationOutcome
impl Eq for 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 ==.Source§impl PartialOrd for TerminationOutcome
impl PartialOrd for TerminationOutcome
impl StructuralPartialEq for TerminationOutcome
Source§impl TryFrom<i32> for TerminationOutcome
impl TryFrom<i32> for TerminationOutcome
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<TerminationOutcome, UnknownEnumValue>
fn try_from(value: i32) -> Result<TerminationOutcome, UnknownEnumValue>
Auto Trait Implementations§
impl Freeze for TerminationOutcome
impl RefUnwindSafe for TerminationOutcome
impl Send for TerminationOutcome
impl Sync for TerminationOutcome
impl Unpin for TerminationOutcome
impl UnsafeUnpin for TerminationOutcome
impl UnwindSafe for TerminationOutcome
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more