pub struct Outbox { /* private fields */ }Implementations§
Source§impl Outbox
impl Outbox
pub fn new(storage: Arc<Storage>) -> Self
pub fn enqueue_event( &self, batch: &mut BatchWriter, operation_id: &str, event: &ChangeEvent, )
pub fn enqueue_events( &self, batch: &mut BatchWriter, operation_id: &str, events: &[ChangeEvent], )
Sourcepub fn pending_events(&self) -> Result<Vec<OutboxEntry>>
pub fn pending_events(&self) -> Result<Vec<OutboxEntry>>
§Errors
Returns an error if reading from storage fails.
Sourcepub fn mark_delivered(&self, operation_id: &str) -> Result<()>
pub fn mark_delivered(&self, operation_id: &str) -> Result<()>
§Errors
Returns an error if removing from storage fails.
Sourcepub fn pending_count(&self) -> Result<usize>
pub fn pending_count(&self) -> Result<usize>
§Errors
Returns an error if reading from storage fails.
Sourcepub fn increment_retry(&self, operation_id: &str) -> Result<()>
pub fn increment_retry(&self, operation_id: &str) -> Result<()>
§Errors
Returns an error if reading or writing to storage fails.
Sourcepub fn update_dispatched_count(
&self,
operation_id: &str,
count: usize,
) -> Result<()>
pub fn update_dispatched_count( &self, operation_id: &str, count: usize, ) -> Result<()>
§Errors
Returns an error if reading or writing to storage fails.
Sourcepub fn move_to_dead_letter(&self, operation_id: &str) -> Result<()>
pub fn move_to_dead_letter(&self, operation_id: &str) -> Result<()>
§Errors
Returns an error if reading or writing to storage fails.
Sourcepub fn dead_letter_entries(&self) -> Result<Vec<OutboxEntry>>
pub fn dead_letter_entries(&self) -> Result<Vec<OutboxEntry>>
§Errors
Returns an error if reading from storage fails.
Sourcepub fn dead_letter_count(&self) -> Result<usize>
pub fn dead_letter_count(&self) -> Result<usize>
§Errors
Returns an error if reading from storage fails.
Auto Trait Implementations§
impl Freeze for Outbox
impl !RefUnwindSafe for Outbox
impl Send for Outbox
impl Sync for Outbox
impl Unpin for Outbox
impl UnsafeUnpin for Outbox
impl !UnwindSafe for Outbox
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