pub struct InboxReceipt {
pub consumer: String,
pub message_id: String,
pub processed_at: SystemTime,
}Expand description
A single consumer/message processing receipt.
Identified by (consumer, message_id); committed atomically with the
consumer’s other writes so a redelivery of the same message is a no-op.
Fields§
§consumer: StringThe logical consumer (e.g. a projection or service name) — the dedupe scope.
message_id: StringThe transport message’s stable id.
processed_at: SystemTimeWhen the receipt was created (advisory). The relational backends stamp the
stored processed_at server-side, so this value is not currently persisted;
it exists for in-process use and forward compatibility with retention/prune.
Implementations§
Source§impl InboxReceipt
impl InboxReceipt
Sourcepub fn new(consumer: impl Into<String>, message_id: impl Into<String>) -> Self
pub fn new(consumer: impl Into<String>, message_id: impl Into<String>) -> Self
Create a receipt for (consumer, message_id), stamped now.
Sourcepub fn validate(&self) -> Result<(), RepositoryError>
pub fn validate(&self) -> Result<(), RepositoryError>
Reject an empty consumer or message_id so every backend behaves
identically (the relational CHECK constraints are a backstop).
Trait Implementations§
Source§impl Clone for InboxReceipt
impl Clone for InboxReceipt
Source§fn clone(&self) -> InboxReceipt
fn clone(&self) -> InboxReceipt
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InboxReceipt
impl Debug for InboxReceipt
impl Eq for InboxReceipt
Source§impl PartialEq for InboxReceipt
impl PartialEq for InboxReceipt
Source§fn eq(&self, other: &InboxReceipt) -> bool
fn eq(&self, other: &InboxReceipt) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InboxReceipt
Auto Trait Implementations§
impl Freeze for InboxReceipt
impl RefUnwindSafe for InboxReceipt
impl Send for InboxReceipt
impl Sync for InboxReceipt
impl Unpin for InboxReceipt
impl UnsafeUnpin for InboxReceipt
impl UnwindSafe for InboxReceipt
Blanket Implementations§
Source§impl<T> AggregateBuilder for T
impl<T> AggregateBuilder for T
fn aggregate<A: Aggregate>(self) -> AggregateRepository<Self, A>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Queueable for T
impl<T> Queueable for T
Source§fn queued(self) -> QueuedRepository<Self, InMemoryAsyncLockManager>
fn queued(self) -> QueuedRepository<Self, InMemoryAsyncLockManager>
Wrap with the default async lock manager. Pair with
.aggregate::<T>() for per-aggregate serialization over the async
repository surface.Source§fn queued_with<L: AsyncLockManager>(
self,
lock_manager: L,
) -> QueuedRepository<Self, L>
fn queued_with<L: AsyncLockManager>( self, lock_manager: L, ) -> QueuedRepository<Self, L>
Wrap with a custom async lock manager.