pub struct PostgresOutboxStore { /* private fields */ }Implementations§
Source§impl PostgresOutboxStore
impl PostgresOutboxStore
pub const fn new(pool: PgPool) -> Self
Sourcepub async fn enqueue_in(
&self,
transaction: &mut Transaction<'_, Postgres>,
record: OutboxRecord,
) -> Result<(), EventError>
pub async fn enqueue_in( &self, transaction: &mut Transaction<'_, Postgres>, record: OutboxRecord, ) -> Result<(), EventError>
Inserts an outbox record into an application adapter’s existing transaction so the domain mutation and publication intent commit atomically.
Trait Implementations§
Source§impl Clone for PostgresOutboxStore
impl Clone for PostgresOutboxStore
Source§fn clone(&self) -> PostgresOutboxStore
fn clone(&self) -> PostgresOutboxStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PostgresOutboxStore
impl Debug for PostgresOutboxStore
Source§impl OutboxStore for PostgresOutboxStore
impl OutboxStore for PostgresOutboxStore
fn enqueue<'life0, 'async_trait>(
&'life0 self,
record: OutboxRecord,
) -> Pin<Box<dyn Future<Output = Result<(), EventError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn claim_pending<'life0, 'life1, 'async_trait>(
&'life0 self,
worker_id: &'life1 str,
limit: usize,
claim_expires_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutboxRecord>, EventError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn claim_event<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: Uuid,
worker_id: &'life1 str,
claim_expires_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Option<OutboxRecord>, EventError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn claim_event<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: Uuid,
worker_id: &'life1 str,
claim_expires_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Option<OutboxRecord>, EventError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Atomically claims one known event for request-assisted publication.
fn mark_published<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: Uuid,
worker_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EventError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn mark_failed<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: Uuid,
worker_id: &'life1 str,
error: String,
retry_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), EventError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn recover_expired_claims<'life0, 'async_trait>(
&'life0 self,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<usize, EventError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for PostgresOutboxStore
impl !UnwindSafe for PostgresOutboxStore
impl Freeze for PostgresOutboxStore
impl Send for PostgresOutboxStore
impl Sync for PostgresOutboxStore
impl Unpin for PostgresOutboxStore
impl UnsafeUnpin for PostgresOutboxStore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more