Enum agner_actors::Exit
source · 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) -> Exitwhere S: Into<String>,
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)>
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
source§impl<IntoExit1, IntoExit2> From<Result<IntoExit1, IntoExit2>> for Exitwhere
IntoExit1: Into<Exit>,
IntoExit2: Into<Exit>,
impl<IntoExit1, IntoExit2> From<Result<IntoExit1, IntoExit2>> for Exitwhere IntoExit1: Into<Exit>, IntoExit2: Into<Exit>,
Auto Trait Implementations§
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