pub struct FileSyncOutbox { /* private fields */ }Expand description
Crash-consistent incremental file-backed synchronization outbox.
Implementations§
Trait Implementations§
Source§impl Debug for FileSyncOutbox
impl Debug for FileSyncOutbox
Source§impl SyncOutbox for FileSyncOutbox
impl SyncOutbox for FileSyncOutbox
Source§fn try_enqueue(&self, message: SyncMessage, max_len: usize) -> SyncResult<bool>
fn try_enqueue(&self, message: SyncMessage, max_len: usize) -> SyncResult<bool>
Enqueues a batch if the current length is below
max_len.Source§fn front(&self) -> SyncResult<Option<SyncMessage>>
fn front(&self) -> SyncResult<Option<SyncMessage>>
Returns the oldest pending batch.
Source§fn acknowledge_front(&self, batch_id: &str) -> SyncResult<()>
fn acknowledge_front(&self, batch_id: &str) -> SyncResult<()>
Removes the oldest batch only when its identifier matches
batch_id.Source§fn messages(&self) -> SyncResult<Vec<SyncMessage>>
fn messages(&self) -> SyncResult<Vec<SyncMessage>>
Returns all pending batches in delivery order.
Source§fn len(&self) -> SyncResult<usize>
fn len(&self) -> SyncResult<usize>
Returns the number of pending batches.
Source§fn peek(&self, limit: usize, max_bytes: usize) -> SyncResult<Vec<SyncMessage>>
fn peek(&self, limit: usize, max_bytes: usize) -> SyncResult<Vec<SyncMessage>>
Returns a delivery-order page bounded before cloning message payloads. Read more
Source§fn stats(&self) -> SyncResult<SyncOutboxStats>
fn stats(&self) -> SyncResult<SyncOutboxStats>
Returns payload-free queue statistics. Read more
Source§fn mark_attempt(&self, batch_id: &str, next_ready_at_ms: u64) -> SyncResult<u32>
fn mark_attempt(&self, batch_id: &str, next_ready_at_ms: u64) -> SyncResult<u32>
Records one failed delivery attempt and its next eligible timestamp. Read more
Source§fn next_ready(
&self,
now_ms: u64,
limit: usize,
max_bytes: usize,
) -> SyncResult<Vec<SyncMessage>>
fn next_ready( &self, now_ms: u64, limit: usize, max_bytes: usize, ) -> SyncResult<Vec<SyncMessage>>
Returns the ready delivery-order prefix within both page bounds. Read more
Source§fn acknowledge_receipt(&self, receipt: &SyncOutboxReceipt) -> SyncResult<usize>
fn acknowledge_receipt(&self, receipt: &SyncOutboxReceipt) -> SyncResult<usize>
Acknowledges the exact ordered prefix named by a partial receipt. Read more
Source§fn is_empty(&self) -> SyncResult<bool>
fn is_empty(&self) -> SyncResult<bool>
Reports whether no batches are pending.
Auto Trait Implementations§
impl !Freeze for FileSyncOutbox
impl !RefUnwindSafe for FileSyncOutbox
impl Send for FileSyncOutbox
impl Sync for FileSyncOutbox
impl Unpin for FileSyncOutbox
impl UnsafeUnpin for FileSyncOutbox
impl UnwindSafe for FileSyncOutbox
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