#[non_exhaustive]pub enum BatchResult {
Uniform(HandlerResult),
PerElement(Vec<Settle>),
}Expand description
The settlement of one dispatched batch.
Returned by batch handlers (usually through IntoBatchResult) and applied by the
dispatcher to each message’s own ack / nack.
Per-element Settles carry an optional and_after continuation each; the uniform form is a
bare outcome, since one continuation cannot fan out to every message of the batch.
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.
Uniform(HandlerResult)
One outcome settles every message of the batch.
PerElement(Vec<Settle>)
Settlement i settles slice element i, each with its own optional post-settle
continuation. A length mismatch with the dispatched batch is a bug in the handler: the
unmatched remainder is retried (an extra redelivery beats a silently lost message) and the
mismatch is logged.
Trait Implementations§
Source§impl Debug for BatchResult
impl Debug for BatchResult
Source§impl IntoBatchResult for BatchResult
impl IntoBatchResult for BatchResult
Source§fn into_batch_result(self) -> BatchResult
fn into_batch_result(self) -> BatchResult
Converts
self into the settlement the dispatcher applies.Auto Trait Implementations§
impl !RefUnwindSafe for BatchResult
impl !Sync for BatchResult
impl !UnwindSafe for BatchResult
impl Freeze for BatchResult
impl Send for BatchResult
impl Unpin for BatchResult
impl UnsafeUnpin for BatchResult
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