pub enum Exit {
Standard(WellKnown),
Backend(BackendFailure),
Custom(ArcError),
}Expand description
An reason an actor exited.
Exit reasons are supposed to be cheaply cloneable, as when an actor fails each linked actor receives a signal containing a clone of that reason.
Variants§
Implementations§
Source§impl Exit
impl Exit
pub fn is_normal(&self) -> bool
pub fn is_kill(&self) -> bool
pub fn is_linked(&self) -> bool
pub fn is_no_actor(&self) -> bool
pub fn is_shutdown(&self) -> bool
pub fn is_custom(&self) -> bool
pub fn normal() -> Self
pub fn kill() -> Self
pub fn linked(who: ActorID, reason: impl Into<Box<Self>>) -> Self
pub fn no_actor() -> Self
pub fn shutdown() -> Self
pub fn shutdown_with_source(source: ArcError) -> Self
pub fn custom<E: Error + Send + Sync + 'static>(e: E) -> Exit
pub fn from_message<S>(message: S) -> Exit
Trait Implementations§
Source§impl Error for Exit
impl Error for Exit
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<BackendFailure> for Exit
impl From<BackendFailure> for Exit
Source§fn from(e: BackendFailure) -> Self
fn from(e: BackendFailure) -> Self
Converts to this type from the input type.
Source§impl From<Infallible> for Exit
impl From<Infallible> for Exit
Auto Trait Implementations§
impl Freeze for Exit
impl !RefUnwindSafe for Exit
impl Send for Exit
impl Sync for Exit
impl Unpin for Exit
impl !UnwindSafe for Exit
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