pub struct MemoryEventBus { /* private fields */ }Implementations§
Source§impl MemoryEventBus
impl MemoryEventBus
pub async fn published(&self) -> Vec<DomainEvent>
pub async fn outbox_records(&self) -> Vec<OutboxRecord>
Trait Implementations§
Source§impl Debug for MemoryEventBus
impl Debug for MemoryEventBus
Source§impl Default for MemoryEventBus
impl Default for MemoryEventBus
Source§fn default() -> MemoryEventBus
fn default() -> MemoryEventBus
Returns the “default value” for a type. Read more
Source§impl EventPublisher for MemoryEventBus
impl EventPublisher for MemoryEventBus
Source§impl OutboxStore for MemoryEventBus
impl OutboxStore for MemoryEventBus
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 !Freeze for MemoryEventBus
impl !RefUnwindSafe for MemoryEventBus
impl Send for MemoryEventBus
impl Sync for MemoryEventBus
impl Unpin for MemoryEventBus
impl UnsafeUnpin for MemoryEventBus
impl UnwindSafe for MemoryEventBus
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