pub struct MemoryOutbox { /* private fields */ }Expand description
In-memory durable queue with lease fencing.
Trait Implementations§
Source§impl Default for MemoryOutbox
impl Default for MemoryOutbox
Source§impl DurableOutbox for MemoryOutbox
impl DurableOutbox for MemoryOutbox
Source§fn subscribe(&self) -> Receiver<NotificationId>
fn subscribe(&self) -> Receiver<NotificationId>
Subscribes to in-process projection changes; consumers always read the
durable row after receiving an id.
Source§fn enqueue<'life0, 'async_trait>(
&'life0 self,
item: NewOutboxItem,
) -> Pin<Box<dyn Future<Output = Result<OutboxItem, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn enqueue<'life0, 'async_trait>(
&'life0 self,
item: NewOutboxItem,
) -> Pin<Box<dyn Future<Output = Result<OutboxItem, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Enqueues idempotently, rejecting payload mismatches.
Source§fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 RequestContext,
id: &'life2 NotificationId,
) -> Pin<Box<dyn Future<Output = Result<OutboxItem, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 RequestContext,
id: &'life2 NotificationId,
) -> Pin<Box<dyn Future<Output = Result<OutboxItem, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Reads one tenant-owned notification.
Source§fn list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 RequestContext,
status: Option<NotificationStatus>,
limit: usize,
after: Option<&'life2 NotificationId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxItem>, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 RequestContext,
status: Option<NotificationStatus>,
limit: usize,
after: Option<&'life2 NotificationId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxItem>, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Lists tenant-owned notifications after an optional cursor.
Source§fn attempts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 RequestContext,
id: &'life2 NotificationId,
) -> Pin<Box<dyn Future<Output = Result<Vec<AttemptEvent>, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn attempts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 RequestContext,
id: &'life2 NotificationId,
) -> Pin<Box<dyn Future<Output = Result<Vec<AttemptEvent>, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Lists immutable attempt history.
Source§fn claim<'life0, 'life1, 'async_trait>(
&'life0 self,
_worker_id: &'life1 str,
_lease_secs: i64,
batch: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxItem>, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn claim<'life0, 'life1, 'async_trait>(
&'life0 self,
_worker_id: &'life1 str,
_lease_secs: i64,
batch: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxItem>, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Claims due work across tenants from a BYPASSRLS worker connection.
Source§fn mark_sent<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NotificationId,
lease_version: i64,
) -> Pin<Box<dyn Future<Output = Result<(), NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_sent<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NotificationId,
lease_version: i64,
) -> Pin<Box<dyn Future<Output = Result<(), NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Records successful delivery under the current lease fence.
Source§fn record_failure<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NotificationId,
lease_version: i64,
class: DeliveryClass,
_delay: Duration,
) -> Pin<Box<dyn Future<Output = Result<NotificationStatus, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn record_failure<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 NotificationId,
lease_version: i64,
class: DeliveryClass,
_delay: Duration,
) -> Pin<Box<dyn Future<Output = Result<NotificationStatus, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Records a classified failure, scheduling retry or dead-lettering atomically.
Source§fn retry_dead_letter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 RequestContext,
id: &'life2 NotificationId,
) -> Pin<Box<dyn Future<Output = Result<OutboxItem, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn retry_dead_letter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 RequestContext,
id: &'life2 NotificationId,
) -> Pin<Box<dyn Future<Output = Result<OutboxItem, NotifyStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Requeues a tenant-owned dead letter after API authorization.
Auto Trait Implementations§
impl !Freeze for MemoryOutbox
impl RefUnwindSafe for MemoryOutbox
impl Send for MemoryOutbox
impl Sync for MemoryOutbox
impl Unpin for MemoryOutbox
impl UnsafeUnpin for MemoryOutbox
impl UnwindSafe for MemoryOutbox
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