Skip to main content

OfflineQueue

Trait OfflineQueue 

Source
pub trait OfflineQueue: Send + Sync {
    // Required methods
    fn enqueue(&self, receipt: &OfflineReceipt) -> ConxianResult<()>;
    fn dequeue_pending(&self) -> ConxianResult<Vec<OfflineReceipt>>;
    fn mark_broadcasted(&self, receipt_id: &str) -> ConxianResult<()>;
    fn claim_replay_key(
        &self,
        replay_key: &str,
        ttl_seconds: u64,
    ) -> ConxianResult<bool>;
}
Expand description

CON-78: Local encrypted queue for offline transactions.

Required Methods§

Source

fn enqueue(&self, receipt: &OfflineReceipt) -> ConxianResult<()>

Source

fn dequeue_pending(&self) -> ConxianResult<Vec<OfflineReceipt>>

Source

fn mark_broadcasted(&self, receipt_id: &str) -> ConxianResult<()>

Source

fn claim_replay_key( &self, replay_key: &str, ttl_seconds: u64, ) -> ConxianResult<bool>

Claims a webhook replay key for a bounded TTL window.

Returns true when this caller successfully claimed the key (first delivery in-window), and false when an unexpired claim already exists.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§