pub struct ShellLifecycle {
pub state: ShellState,
pub kill_reason: Option<String>,
pub suspend_reason: Option<String>,
pub migration_target: Option<String>,
}Expand description
The lifecycle state machine for a single shell.
Fields§
§state: ShellState§kill_reason: Option<String>§suspend_reason: Option<String>§migration_target: Option<String>Implementations§
Source§impl ShellLifecycle
impl ShellLifecycle
pub fn new() -> Self
pub fn can_transition_to(&self, target: &ShellState) -> bool
Sourcepub fn transition(
&mut self,
event: LifecycleEvent,
) -> Result<(), LifecycleError>
pub fn transition( &mut self, event: LifecycleEvent, ) -> Result<(), LifecycleError>
Attempt a state transition based on the given event.
Trait Implementations§
Source§impl Clone for ShellLifecycle
impl Clone for ShellLifecycle
Source§fn clone(&self) -> ShellLifecycle
fn clone(&self) -> ShellLifecycle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ShellLifecycle
impl Debug for ShellLifecycle
Source§impl Default for ShellLifecycle
impl Default for ShellLifecycle
Source§impl<'de> Deserialize<'de> for ShellLifecycle
impl<'de> Deserialize<'de> for ShellLifecycle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ShellLifecycle
impl PartialEq for ShellLifecycle
Source§fn eq(&self, other: &ShellLifecycle) -> bool
fn eq(&self, other: &ShellLifecycle) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ShellLifecycle
impl Serialize for ShellLifecycle
impl StructuralPartialEq for ShellLifecycle
Auto Trait Implementations§
impl Freeze for ShellLifecycle
impl RefUnwindSafe for ShellLifecycle
impl Send for ShellLifecycle
impl Sync for ShellLifecycle
impl Unpin for ShellLifecycle
impl UnsafeUnpin for ShellLifecycle
impl UnwindSafe for ShellLifecycle
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