pub enum ActorStatus {
Unknown,
Created,
Initializing,
Client,
Idle,
Processing(SystemTime, Option<(String, Option<String>)>),
Saving(SystemTime),
Loading(SystemTime),
Stopping,
Stopped,
Failed(ActorErrorKind),
}Expand description
The runtime status of an actor.
Variants§
Unknown
The actor status is unknown.
Created
The actor was created, but not yet started.
Initializing
The actor is initializing. It is not yet ready to receive messages.
Client
The actor is in “client” state: the user is managing the actor’s mailboxes manually.
Idle
The actor is ready to receive messages, but is currently idle.
Processing(SystemTime, Option<(String, Option<String>)>)
The actor has been processing a message, beginning at the specified instant. The message handler and arm is included. TODO: we shoudl use interned representations here, so we don’t copy strings willy-nilly.
Saving(SystemTime)
The actor has been saving its state.
Loading(SystemTime)
The actor has been loading its state.
Stopping
The actor is stopping. It is draining messages.
Stopped
The actor is stopped. It is no longer processing messages.
Failed(ActorErrorKind)
The actor failed with the provided actor error.
Implementations§
Source§impl ActorStatus
impl ActorStatus
Sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true if this is a ActorStatus::Unknown, otherwise false
Sourcepub fn is_created(&self) -> bool
pub fn is_created(&self) -> bool
Returns true if this is a ActorStatus::Created, otherwise false
Sourcepub fn is_initializing(&self) -> bool
pub fn is_initializing(&self) -> bool
Returns true if this is a ActorStatus::Initializing, otherwise false
Sourcepub fn is_processing(&self) -> bool
pub fn is_processing(&self) -> bool
Returns true if this is a ActorStatus::Processing, otherwise false
Sourcepub fn as_processing_mut(
&mut self,
) -> Option<(&mut SystemTime, &mut Option<(String, Option<String>)>)>
pub fn as_processing_mut( &mut self, ) -> Option<(&mut SystemTime, &mut Option<(String, Option<String>)>)>
Optionally returns mutable references to the inner fields if this is a ActorStatus::Processing, otherwise None
Sourcepub fn as_processing(
&self,
) -> Option<(&SystemTime, &Option<(String, Option<String>)>)>
pub fn as_processing( &self, ) -> Option<(&SystemTime, &Option<(String, Option<String>)>)>
Optionally returns references to the inner fields if this is a ActorStatus::Processing, otherwise None
Sourcepub fn into_processing(
self,
) -> Result<(SystemTime, Option<(String, Option<String>)>), ActorStatus>
pub fn into_processing( self, ) -> Result<(SystemTime, Option<(String, Option<String>)>), ActorStatus>
Returns the inner fields if this is a ActorStatus::Processing, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_saving_mut(&mut self) -> Option<&mut SystemTime>
pub fn as_saving_mut(&mut self) -> Option<&mut SystemTime>
Optionally returns mutable references to the inner fields if this is a ActorStatus::Saving, otherwise None
Sourcepub fn as_saving(&self) -> Option<&SystemTime>
pub fn as_saving(&self) -> Option<&SystemTime>
Optionally returns references to the inner fields if this is a ActorStatus::Saving, otherwise None
Sourcepub fn into_saving(self) -> Result<SystemTime, ActorStatus>
pub fn into_saving(self) -> Result<SystemTime, ActorStatus>
Returns the inner fields if this is a ActorStatus::Saving, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_loading(&self) -> bool
pub fn is_loading(&self) -> bool
Returns true if this is a ActorStatus::Loading, otherwise false
Sourcepub fn as_loading_mut(&mut self) -> Option<&mut SystemTime>
pub fn as_loading_mut(&mut self) -> Option<&mut SystemTime>
Optionally returns mutable references to the inner fields if this is a ActorStatus::Loading, otherwise None
Sourcepub fn as_loading(&self) -> Option<&SystemTime>
pub fn as_loading(&self) -> Option<&SystemTime>
Optionally returns references to the inner fields if this is a ActorStatus::Loading, otherwise None
Sourcepub fn into_loading(self) -> Result<SystemTime, ActorStatus>
pub fn into_loading(self) -> Result<SystemTime, ActorStatus>
Returns the inner fields if this is a ActorStatus::Loading, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_stopping(&self) -> bool
pub fn is_stopping(&self) -> bool
Returns true if this is a ActorStatus::Stopping, otherwise false
Sourcepub fn is_stopped(&self) -> bool
pub fn is_stopped(&self) -> bool
Returns true if this is a ActorStatus::Stopped, otherwise false
Sourcepub fn as_failed_mut(&mut self) -> Option<&mut ActorErrorKind>
pub fn as_failed_mut(&mut self) -> Option<&mut ActorErrorKind>
Optionally returns mutable references to the inner fields if this is a ActorStatus::Failed, otherwise None
Sourcepub fn as_failed(&self) -> Option<&ActorErrorKind>
pub fn as_failed(&self) -> Option<&ActorErrorKind>
Optionally returns references to the inner fields if this is a ActorStatus::Failed, otherwise None
Sourcepub fn into_failed(self) -> Result<ActorErrorKind, ActorStatus>
pub fn into_failed(self) -> Result<ActorErrorKind, ActorStatus>
Returns the inner fields if this is a ActorStatus::Failed, otherwise returns back the enum in the Err case of the result
Source§impl ActorStatus
impl ActorStatus
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Tells whether the status is a terminal state.
Sourcepub fn generic_failure(message: impl Into<String>) -> ActorStatus
pub fn generic_failure(message: impl Into<String>) -> ActorStatus
Create a generic failure status with the provided error message.
Trait Implementations§
Source§impl Clone for ActorStatus
impl Clone for ActorStatus
Source§fn clone(&self) -> ActorStatus
fn clone(&self) -> ActorStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ActorStatus
impl Debug for ActorStatus
Source§impl<'de> Deserialize<'de> for ActorStatus
impl<'de> Deserialize<'de> for ActorStatus
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActorStatus, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ActorStatus, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for ActorStatus
impl Display for ActorStatus
Source§impl Named for ActorStatus
impl Named for ActorStatus
Source§fn typename() -> &'static str
fn typename() -> &'static str
Source§fn typehash() -> u64
fn typehash() -> u64
Source§fn arm(&self) -> Option<&'static str>
fn arm(&self) -> Option<&'static str>
Source§fn typeid() -> TypeId
fn typeid() -> TypeId
Source§impl PartialEq for ActorStatus
impl PartialEq for ActorStatus
Source§impl Serialize for ActorStatus
impl Serialize for ActorStatus
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for ActorStatus
impl StructuralPartialEq for ActorStatus
Auto Trait Implementations§
impl Freeze for ActorStatus
impl !RefUnwindSafe for ActorStatus
impl Send for ActorStatus
impl Sync for ActorStatus
impl Unpin for ActorStatus
impl !UnwindSafe for ActorStatus
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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> Checkpointable for Twhere
T: RemoteMessage + Clone,
impl<T> Checkpointable for Twhere
T: RemoteMessage + Clone,
Source§type State = T
type State = T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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