1use crate::Message;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum ActorError {
6 #[error(transparent)]
7 OneshotRecv(#[from] tokio::sync::oneshot::error::RecvError),
8 #[error(transparent)]
9 UnboundedChannelSend(#[from] tokio::sync::mpsc::error::SendError<Message>),
10 #[error(transparent)]
11 RmpDecodeError(#[from] rmp_serde::decode::Error),
12 #[error(transparent)]
13 RmpEncodeError(#[from] rmp_serde::encode::Error),
14 #[error(transparent)]
15 AddressRegexError(#[from] regex::Error),
16
17 #[error("Address {0} not found")]
18 AddressNotFound(String),
19 #[error("Actor that's address is {0} not ready")]
20 ActorNotReady(String),
21 #[error("Actor clone failed: {0}")]
22 CloneFailed(String),
23}