pub enum Error {
SendError(String),
RecvError(String),
NoSuchActor(String),
}
Expand description
Errors that can occur.
Variants§
SendError(String)
An error sending on a channel.
Converts the underlying crossbeam_channel::SendError
into a string representation to make
it easier, if less flexible, to deal with.
RecvError(String)
An error receiving on a channel.
Converts the underlying crossbeam_channel::RecvError
into a string representation to make
it easier, if less flexible, to deal with.
NoSuchActor(String)
The specified actor does not exist, or is not known to the router. Embeds the ID of the actor.
If an actor thread panics or otherwise chooses to stop, it is removed from the router and subsequent attempts to send messages to that actor will result in this error.
Implementations§
Source§impl Error
impl Error
Sourcepub fn send_error<T>(e: SendError<T>) -> Self
pub fn send_error<T>(e: SendError<T>) -> Self
Construct an Error::SendError
from an underlying crossbeam_channel::SendError<T>
.
Sourcepub fn recv_error(e: RecvError) -> Self
pub fn recv_error(e: RecvError) -> Self
Construct an Error::RecvError
from an underlying crossbeam_channel::RecvError
.