pub enum RouterError<M, O, E> {
NoEligibleRecipients(M),
InvalidSelection {
message: M,
index: usize,
members: usize,
},
Policy {
observation: O,
error: E,
},
}Expand description
A routing rejection that preserves the unaccepted payload.
Selection failure is ordinary typed behavior failure; it does not stop the actor, mutate policy state, or ask the runtime to fabricate a recipient.
Variants§
NoEligibleRecipients(M)
No recipient was eligible at the instant this command was folded.
InvalidSelection
The selected policy returned an index outside the exact membership snapshot it received. The command and policy state remain unconsumed.
Fields
§
message: MUnaccepted destination command.
Policy
The concrete policy rejected its typed observation atomically.
Trait Implementations§
Source§impl<M: Clone, O: Clone, E: Clone> Clone for RouterError<M, O, E>
impl<M: Clone, O: Clone, E: Clone> Clone for RouterError<M, O, E>
Source§fn clone(&self) -> RouterError<M, O, E>
fn clone(&self) -> RouterError<M, O, E>
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<M, O, E> Display for RouterError<M, O, E>
impl<M, O, E> Display for RouterError<M, O, E>
Source§impl<M, O, E> Error for RouterError<M, O, E>
impl<M, O, E> Error for RouterError<M, O, E>
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
impl<M: Eq, O: Eq, E: Eq> Eq for RouterError<M, O, E>
impl<M, O, E> StructuralPartialEq for RouterError<M, O, E>
Auto Trait Implementations§
impl<M, O, E> Freeze for RouterError<M, O, E>
impl<M, O, E> RefUnwindSafe for RouterError<M, O, E>
impl<M, O, E> Send for RouterError<M, O, E>
impl<M, O, E> Sync for RouterError<M, O, E>
impl<M, O, E> Unpin for RouterError<M, O, E>
impl<M, O, E> UnsafeUnpin for RouterError<M, O, E>
impl<M, O, E> UnwindSafe for RouterError<M, O, E>
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