pub struct InMemorySagaJournal { /* private fields */ }Expand description
In-memory journal for unit tests.
Implementations§
Source§impl InMemorySagaJournal
impl InMemorySagaJournal
Sourcepub fn records(&self) -> Vec<SagaJournalRecord>
pub fn records(&self) -> Vec<SagaJournalRecord>
Trait Implementations§
Source§impl Default for InMemorySagaJournal
impl Default for InMemorySagaJournal
Source§fn default() -> InMemorySagaJournal
fn default() -> InMemorySagaJournal
Returns the “default value” for a type. Read more
Source§impl SagaJournal for InMemorySagaJournal
impl SagaJournal for InMemorySagaJournal
Source§fn on_started<'a>(
&'a self,
saga_id: &'a [u8],
_steps: usize,
catalog_version: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<(), SagaJournalError>> + Send + 'a>>
fn on_started<'a>( &'a self, saga_id: &'a [u8], _steps: usize, catalog_version: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<(), SagaJournalError>> + Send + 'a>>
Persist saga start.
Source§fn on_step_committed<'a>(
&'a self,
saga_id: &'a [u8],
step: usize,
) -> Pin<Box<dyn Future<Output = Result<(), SagaJournalError>> + Send + 'a>>
fn on_step_committed<'a>( &'a self, saga_id: &'a [u8], step: usize, ) -> Pin<Box<dyn Future<Output = Result<(), SagaJournalError>> + Send + 'a>>
Persist a committed forward step.
Source§fn on_completed<'a>(
&'a self,
saga_id: &'a [u8],
) -> Pin<Box<dyn Future<Output = Result<(), SagaJournalError>> + Send + 'a>>
fn on_completed<'a>( &'a self, saga_id: &'a [u8], ) -> Pin<Box<dyn Future<Output = Result<(), SagaJournalError>> + Send + 'a>>
Persist saga completion.
Source§fn on_compensation_started<'a>(
&'a self,
saga_id: &'a [u8],
failed_step: usize,
) -> Pin<Box<dyn Future<Output = Result<(), SagaJournalError>> + Send + 'a>>
fn on_compensation_started<'a>( &'a self, saga_id: &'a [u8], failed_step: usize, ) -> Pin<Box<dyn Future<Output = Result<(), SagaJournalError>> + Send + 'a>>
Persist compensation start after forward failure.
Source§fn on_compensated<'a>(
&'a self,
saga_id: &'a [u8],
_compensated_steps: usize,
) -> Pin<Box<dyn Future<Output = Result<(), SagaJournalError>> + Send + 'a>>
fn on_compensated<'a>( &'a self, saga_id: &'a [u8], _compensated_steps: usize, ) -> Pin<Box<dyn Future<Output = Result<(), SagaJournalError>> + Send + 'a>>
Persist successful compensation.
Auto Trait Implementations§
impl !Freeze for InMemorySagaJournal
impl RefUnwindSafe for InMemorySagaJournal
impl Send for InMemorySagaJournal
impl Sync for InMemorySagaJournal
impl Unpin for InMemorySagaJournal
impl UnsafeUnpin for InMemorySagaJournal
impl UnwindSafe for InMemorySagaJournal
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