pub enum ActorError {
OneshotRecv(RecvError),
ChannelSend(String),
ChannelRecv,
Timeout(Duration),
AddressRegexError(Error),
AddressAlreadyExist(String),
AddressNotFound(String),
ActorNotReady(String),
CloneFailed(String),
UnhealthyActorSystem,
MessageTypeMismatch,
}Expand description
All errors surfaced by the actor system.
Variants gated on multi-node only exist when that feature is enabled.
Most user-facing call sites return Result<_, ActorError>; match on the
variant when you need to distinguish (e.g. retry on ActorNotReady vs.
give up on AddressNotFound).
Variants§
OneshotRecv(RecvError)
oneshot::Receiver::await failed (sender dropped before sending).
Typically means the actor task died between accepting the message
and producing a reply.
ChannelSend(String)
Channel send failed — the receiver was dropped. Indicates the target mailbox/loop has shut down. Same variant for both the bounded and unbounded mpsc backends.
ChannelRecv
Channel recv returned None — all senders are gone. Same
variant for both backends.
Timeout(Duration)
A timed send_and_recv (via
ActorSystem::send_and_recv_with_timeout or
ActorSystem::send_and_recv_without_tx_cache_with_timeout) did
not receive its reply within the configured duration. Common
cause in multi-node mode: the remote peer died or the broker
dropped the in-flight request.
AddressRegexError(Error)
address_regex failed to compile (broadcast / restart / unregister).
AddressAlreadyExist(String)
Tried to register an actor at an address that’s already taken on this node (and not a restart). Re-registration with the same address fails until the existing entry is unregistered.
AddressNotFound(String)
send / send_and_recv / run_job could not find the address in
the local actor map. With multi-node this is the local-side
failure mode after the routing check decides the call is local.
ActorNotReady(String)
The address exists but the actor’s lifecycle is not yet Receiving
after the retry budget (10 × 100 ms). Usually means the actor is
still in Starting / Restarting.
CloneFailed(String)
Reserved for cases where cloning an actor state fails. Currently not produced by the runtime.
UnhealthyActorSystem
Actor::register could not reach actor_system_loop after 10
retries — the system is wedged or shutting down.
MessageTypeMismatch
Downcast from Arc<dyn Any> / Box<dyn Any> to the expected
concrete message or result type failed. Usually means a send::<T>
(or send_and_recv::<T>) was routed to an address whose actor type
doesn’t match T.
Trait Implementations§
Source§impl Debug for ActorError
impl Debug for ActorError
Source§impl Display for ActorError
impl Display for ActorError
Source§impl Error for ActorError
impl Error for ActorError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()