pub struct EventStore { /* private fields */ }Expand description
Event store for durable workflow events.
Implementations§
Source§impl EventStore
impl EventStore
Sourcepub async fn send_event(
&self,
event_name: &str,
correlation_id: &str,
payload: Option<Value>,
) -> Result<Uuid>
pub async fn send_event( &self, event_name: &str, correlation_id: &str, payload: Option<Value>, ) -> Result<Uuid>
Send an event to a workflow.
Sourcepub async fn consume_event(
&self,
event_name: &str,
correlation_id: &str,
workflow_run_id: Uuid,
) -> Result<Option<WorkflowEvent>>
pub async fn consume_event( &self, event_name: &str, correlation_id: &str, workflow_run_id: Uuid, ) -> Result<Option<WorkflowEvent>>
Consume an event for a workflow.
Sourcepub async fn has_event(
&self,
event_name: &str,
correlation_id: &str,
) -> Result<bool>
pub async fn has_event( &self, event_name: &str, correlation_id: &str, ) -> Result<bool>
Check if an event exists for a workflow (without consuming).
Sourcepub async fn list_pending_events(
&self,
correlation_id: &str,
) -> Result<Vec<WorkflowEvent>>
pub async fn list_pending_events( &self, correlation_id: &str, ) -> Result<Vec<WorkflowEvent>>
List pending events for a workflow.
Trait Implementations§
Source§impl WorkflowEventSender for EventStore
impl WorkflowEventSender for EventStore
Auto Trait Implementations§
impl Freeze for EventStore
impl !RefUnwindSafe for EventStore
impl Send for EventStore
impl Sync for EventStore
impl Unpin for EventStore
impl !UnwindSafe for EventStore
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> 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