pub struct WorkflowJournal<I: WorkflowJournalIntent> { /* private fields */ }Expand description
Exclusive writer for one exact local operator workflow.
Implementations§
Source§impl<I: WorkflowJournalIntent> WorkflowJournal<I>
impl<I: WorkflowJournalIntent> WorkflowJournal<I>
Sourcepub async fn open_or_create(
path: impl AsRef<Path>,
intent: I,
) -> Result<WorkflowJournalReplay<I>, WorkflowJournalError>
pub async fn open_or_create( path: impl AsRef<Path>, intent: I, ) -> Result<WorkflowJournalReplay<I>, WorkflowJournalError>
Creates or exactly resumes and locks one workflow journal.
pub const fn transaction_id(&self) -> WorkflowTransactionId
pub const fn intent_digest(&self) -> [u8; 32]
Sourcepub async fn append(
&self,
transition: I::Transition,
) -> Result<WorkflowJournalRecordReceipt, WorkflowJournalError>
pub async fn append( &self, transition: I::Transition, ) -> Result<WorkflowJournalRecordReceipt, WorkflowJournalError>
Appends and synchronizes one transition before returning its receipt.
Any publication error poisons this handle because the create-new link may have committed. Drop and reopen the journal to resolve it by replay.
Auto Trait Implementations§
impl<I> Freeze for WorkflowJournal<I>where
PhantomData<I>: Freeze,
impl<I> RefUnwindSafe for WorkflowJournal<I>where
PhantomData<I>: RefUnwindSafe,
impl<I> Send for WorkflowJournal<I>where
PhantomData<I>: Send,
impl<I> Sync for WorkflowJournal<I>where
PhantomData<I>: Sync,
impl<I> Unpin for WorkflowJournal<I>where
PhantomData<I>: Unpin,
impl<I> UnsafeUnpin for WorkflowJournal<I>where
PhantomData<I>: UnsafeUnpin,
impl<I> UnwindSafe for WorkflowJournal<I>where
PhantomData<I>: UnwindSafe,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request