Skip to main content

MailboxTables

Trait MailboxTables 

Source
pub trait MailboxTables:
    Send
    + Sync
    + 'static {
Show 13 methods // Required methods fn highest_known_persistent_sequence<'a>( op: impl IntoOneTimeExecutor<'a>, ) -> impl Future<Output = Result<EventSequence, Error>> + Send; fn persist_events<'a, P>( op: &mut HookOperation<'a>, events: impl Iterator<Item = P>, ) -> impl Future<Output = Result<Vec<PersistentOutboxEvent<P>>, Error>> + Send where P: Serialize + DeserializeOwned + Send; fn load_next_page<P>( pool: &PgPool, from_sequence: EventSequence, buffer_size: usize, ) -> impl Future<Output = Result<Vec<PersistentOutboxEvent<P>>, Error>> + Send where P: Serialize + DeserializeOwned + Send; fn persist_ephemeral_event<P>( pool: &PgPool, now: Option<DateTime<Utc>>, event_type: EphemeralEventType, payload: P, ) -> impl Future<Output = Result<EphemeralOutboxEvent<P>, Error>> + Send where P: Serialize + DeserializeOwned + Send; fn persist_ephemeral_event_in_op<'a, P>( op: &mut HookOperation<'a>, event_type: EphemeralEventType, payload: P, ) -> impl Future<Output = Result<EphemeralOutboxEvent<P>, Error>> + Send where P: Serialize + DeserializeOwned + Send; fn load_ephemeral_events<P>( pool: &PgPool, event_type_filter: Option<EphemeralEventType>, ) -> impl Future<Output = Result<Vec<EphemeralOutboxEvent<P>>, Error>> + Send where P: Serialize + DeserializeOwned + Send; fn persistent_outbox_events_channel() -> &'static str; fn ephemeral_outbox_events_channel() -> &'static str; fn insert_inbox_event<P>( op: &mut impl AtomicOperation, idempotency_key: &InboxIdempotencyKey, payload: &P, ) -> impl Future<Output = Result<Option<InboxEventId>, Error>> + Send where P: Serialize + Send + Sync; fn find_inbox_event_by_id( pool: &PgPool, id: InboxEventId, ) -> impl Future<Output = Result<InboxEvent, InboxError>> + Send; fn update_inbox_event_status( pool: &PgPool, now: Option<DateTime<Utc>>, id: InboxEventId, status: InboxEventStatus, error: Option<&str>, ) -> impl Future<Output = Result<(), Error>> + Send; fn update_inbox_event_status_in_op( op: &mut impl AtomicOperation, id: InboxEventId, status: InboxEventStatus, error: Option<&str>, ) -> impl Future<Output = Result<(), Error>> + Send; fn list_inbox_events_by_status( pool: &PgPool, status: InboxEventStatus, limit: usize, ) -> impl Future<Output = Result<Vec<InboxEvent>, InboxError>> + Send;
}

Required Methods§

Source

fn highest_known_persistent_sequence<'a>( op: impl IntoOneTimeExecutor<'a>, ) -> impl Future<Output = Result<EventSequence, Error>> + Send

Source

fn persist_events<'a, P>( op: &mut HookOperation<'a>, events: impl Iterator<Item = P>, ) -> impl Future<Output = Result<Vec<PersistentOutboxEvent<P>>, Error>> + Send

Source

fn load_next_page<P>( pool: &PgPool, from_sequence: EventSequence, buffer_size: usize, ) -> impl Future<Output = Result<Vec<PersistentOutboxEvent<P>>, Error>> + Send

Source

fn persist_ephemeral_event<P>( pool: &PgPool, now: Option<DateTime<Utc>>, event_type: EphemeralEventType, payload: P, ) -> impl Future<Output = Result<EphemeralOutboxEvent<P>, Error>> + Send

Source

fn persist_ephemeral_event_in_op<'a, P>( op: &mut HookOperation<'a>, event_type: EphemeralEventType, payload: P, ) -> impl Future<Output = Result<EphemeralOutboxEvent<P>, Error>> + Send

Source

fn load_ephemeral_events<P>( pool: &PgPool, event_type_filter: Option<EphemeralEventType>, ) -> impl Future<Output = Result<Vec<EphemeralOutboxEvent<P>>, Error>> + Send

Source

fn persistent_outbox_events_channel() -> &'static str

Source

fn ephemeral_outbox_events_channel() -> &'static str

Source

fn insert_inbox_event<P>( op: &mut impl AtomicOperation, idempotency_key: &InboxIdempotencyKey, payload: &P, ) -> impl Future<Output = Result<Option<InboxEventId>, Error>> + Send
where P: Serialize + Send + Sync,

Source

fn find_inbox_event_by_id( pool: &PgPool, id: InboxEventId, ) -> impl Future<Output = Result<InboxEvent, InboxError>> + Send

Source

fn update_inbox_event_status( pool: &PgPool, now: Option<DateTime<Utc>>, id: InboxEventId, status: InboxEventStatus, error: Option<&str>, ) -> impl Future<Output = Result<(), Error>> + Send

Source

fn update_inbox_event_status_in_op( op: &mut impl AtomicOperation, id: InboxEventId, status: InboxEventStatus, error: Option<&str>, ) -> impl Future<Output = Result<(), Error>> + Send

Source

fn list_inbox_events_by_status( pool: &PgPool, status: InboxEventStatus, limit: usize, ) -> impl Future<Output = Result<Vec<InboxEvent>, InboxError>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§