#[non_exhaustive]pub enum DeadLetterReason {
ActorStopped,
Timeout,
ReplyDropped,
}Expand description
Reason why a message became a dead letter.
This enum is marked #[non_exhaustive] to allow adding new variants
in future versions without breaking existing code.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ActorStopped
Actor’s mailbox channel was closed.
This occurs when attempting to send a message to an actor that is no longer
running. The actor may have stopped normally via ActorRef::stop or
terminated abnormally.
Timeout
A send or ask operation exceeded its timeout.
When using ActorRef::tell_with_timeout or
ActorRef::ask_with_timeout,
if the message cannot be delivered within the specified duration,
it becomes a dead letter.
ReplyDropped
The reply channel was dropped before a response could be sent.
When using ActorRef::ask, the handler may fail or the message processing
may be interrupted before sending a reply.
Trait Implementations§
Source§impl Clone for DeadLetterReason
impl Clone for DeadLetterReason
Source§fn clone(&self) -> DeadLetterReason
fn clone(&self) -> DeadLetterReason
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeadLetterReason
impl Debug for DeadLetterReason
Source§impl Display for DeadLetterReason
impl Display for DeadLetterReason
Source§impl PartialEq for DeadLetterReason
impl PartialEq for DeadLetterReason
impl Copy for DeadLetterReason
impl Eq for DeadLetterReason
impl StructuralPartialEq for DeadLetterReason
Auto Trait Implementations§
impl Freeze for DeadLetterReason
impl RefUnwindSafe for DeadLetterReason
impl Send for DeadLetterReason
impl Sync for DeadLetterReason
impl Unpin for DeadLetterReason
impl UnwindSafe for DeadLetterReason
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