pub trait MailboxWriter: MailboxReader {
Show 13 methods
// Required methods
fn enqueue_mailbox_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 MailboxEntry,
) -> Pin<Box<dyn Future<Output = Result<(), MailboxStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn ensure_mailbox_state<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<MailboxState, MailboxStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn claim_mailbox_entries<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mailbox_id: Option<&'life1 str>,
limit: usize,
consumer_id: &'life2 str,
now: u64,
lease_duration_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn claim_mailbox_entry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
consumer_id: &'life2 str,
now: u64,
lease_duration_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn ack_mailbox_entry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<(), MailboxStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn nack_mailbox_entry<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
retry_at: u64,
error: &'life3 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<(), MailboxStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn dead_letter_mailbox_entry<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
error: &'life3 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<(), MailboxStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn cancel_mailbox_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn supersede_mailbox_entry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
now: u64,
reason: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn cancel_pending_for_mailbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 str,
now: u64,
exclude_entry_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn interrupt_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<MailboxInterrupt, MailboxStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn extend_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
extension_ms: u64,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<bool, MailboxStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn purge_terminal_mailbox_entries<'life0, 'async_trait>(
&'life0 self,
older_than: u64,
) -> Pin<Box<dyn Future<Output = Result<usize, MailboxStoreError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
fn enqueue_mailbox_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
entry: &'life1 MailboxEntry,
) -> Pin<Box<dyn Future<Output = Result<(), MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ensure_mailbox_state<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<MailboxState, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn claim_mailbox_entries<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mailbox_id: Option<&'life1 str>,
limit: usize,
consumer_id: &'life2 str,
now: u64,
lease_duration_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn claim_mailbox_entry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
consumer_id: &'life2 str,
now: u64,
lease_duration_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn ack_mailbox_entry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<(), MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn nack_mailbox_entry<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
retry_at: u64,
error: &'life3 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<(), MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn dead_letter_mailbox_entry<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
error: &'life3 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<(), MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn cancel_mailbox_entry<'life0, 'life1, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn supersede_mailbox_entry<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
now: u64,
reason: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn cancel_pending_for_mailbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 str,
now: u64,
exclude_entry_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<MailboxEntry>, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn interrupt_mailbox<'life0, 'life1, 'async_trait>(
&'life0 self,
mailbox_id: &'life1 str,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<MailboxInterrupt, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn extend_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
extension_ms: u64,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<bool, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn extend_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
entry_id: &'life1 str,
claim_token: &'life2 str,
extension_ms: u64,
now: u64,
) -> Pin<Box<dyn Future<Output = Result<bool, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Extend the lease on a claimed entry.
Returns true if the lease was extended, false if the claim token does
not match or the entry is no longer in Claimed status.
Sourcefn purge_terminal_mailbox_entries<'life0, 'async_trait>(
&'life0 self,
older_than: u64,
) -> Pin<Box<dyn Future<Output = Result<usize, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn purge_terminal_mailbox_entries<'life0, 'async_trait>(
&'life0 self,
older_than: u64,
) -> Pin<Box<dyn Future<Output = Result<usize, MailboxStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete terminal entries older than older_than (unix millis). Returns count deleted.