#[non_exhaustive]pub enum HandlerOutcome {
Ack,
Retry,
DeadLetter {
reason: &'static str,
detail: String,
},
}Expand description
What a handler answers. The worker turns it into a super::delivery::Delivery with
super::delivery::decide.
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.
Ack
Done: never deliver it again.
Retry
Failed for now: deliver it again later, until the cap.
DeadLetter
Never deliver it again, and keep a dead letter saying why.
Implementations§
Source§impl HandlerOutcome
impl HandlerOutcome
pub fn dead_letter(reason: &'static str, detail: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for HandlerOutcome
impl Clone for HandlerOutcome
Source§impl Debug for HandlerOutcome
impl Debug for HandlerOutcome
impl Eq for HandlerOutcome
Source§impl PartialEq for HandlerOutcome
impl PartialEq for HandlerOutcome
impl StructuralPartialEq for HandlerOutcome
Auto Trait Implementations§
impl Freeze for HandlerOutcome
impl RefUnwindSafe for HandlerOutcome
impl Send for HandlerOutcome
impl Sync for HandlerOutcome
impl Unpin for HandlerOutcome
impl UnsafeUnpin for HandlerOutcome
impl UnwindSafe for HandlerOutcome
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