pub enum ActorState {
Initializing,
Running,
Paused,
Stopped,
Failed(String),
}Expand description
Lifecycle states of an actor.
Transitions: Initializing → Running → Paused ⇄ Running → Stopped
Errors can force the actor into Failed from any running state.
Variants§
Initializing
Actor is being initialised (resources not yet ready).
Running
Actor is processing messages normally.
Paused
Actor is temporarily suspended; mailbox still buffering.
Stopped
Actor has been cleanly shut down.
Failed(String)
Actor encountered an unrecoverable error.
Trait Implementations§
Source§impl Clone for ActorState
impl Clone for ActorState
Source§fn clone(&self) -> ActorState
fn clone(&self) -> ActorState
Returns a duplicate of the value. Read more
1.0.0 · 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 ActorState
impl Debug for ActorState
Source§impl<'de> Deserialize<'de> for ActorState
impl<'de> Deserialize<'de> for ActorState
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 Display for ActorState
impl Display for ActorState
Source§impl PartialEq for ActorState
impl PartialEq for ActorState
Source§impl Serialize for ActorState
impl Serialize for ActorState
impl Eq for ActorState
impl StructuralPartialEq for ActorState
Auto Trait Implementations§
impl Freeze for ActorState
impl RefUnwindSafe for ActorState
impl Send for ActorState
impl Sync for ActorState
impl Unpin for ActorState
impl UnwindSafe for ActorState
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