pub struct InMemorySyncOutbox { /* private fields */ }Expand description
Process-local synchronization outbox.
Implementations§
Trait Implementations§
Source§impl Debug for InMemorySyncOutbox
impl Debug for InMemorySyncOutbox
Source§impl Default for InMemorySyncOutbox
impl Default for InMemorySyncOutbox
Source§fn default() -> InMemorySyncOutbox
fn default() -> InMemorySyncOutbox
Returns the “default value” for a type. Read more
Source§impl SyncOutbox for InMemorySyncOutbox
impl SyncOutbox for InMemorySyncOutbox
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 is_empty(&self) -> SyncResult<bool>
fn is_empty(&self) -> SyncResult<bool>
Reports whether no batches are pending.
Auto Trait Implementations§
impl !Freeze for InMemorySyncOutbox
impl !RefUnwindSafe for InMemorySyncOutbox
impl Send for InMemorySyncOutbox
impl Sync for InMemorySyncOutbox
impl Unpin for InMemorySyncOutbox
impl UnsafeUnpin for InMemorySyncOutbox
impl UnwindSafe for InMemorySyncOutbox
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