ActorError

Trait ActorError 

Source
pub trait ActorError:
    Sized
    + Send
    + 'static {
    // Required method
    fn from_actor_message(msg: String) -> Self;
}
Expand description

Convert panic/actor-stop messages into your error type.

Implemented for io::Error, anyhow::Error, String, and Box<dyn Error>.

§Example

impl ActorError for MyError {
    fn from_actor_message(msg: String) -> Self {
        MyError::ActorPanic(msg)
    }
}

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ActorError for Box<dyn Error + Send + Sync>

Source§

impl ActorError for String

Source§

impl ActorError for Error

Implementors§