Skip to main content

MemorySagaOutbox

Struct MemorySagaOutbox 

Source
pub struct MemorySagaOutbox<S, C>
where C: Command<Output = ()>,
{ /* private fields */ }
Expand description

In-memory saga state and action outbox sharing one atomic commit boundary.

Implementations§

Source§

impl<S, C> MemorySagaOutbox<S, C>
where C: Command<Output = ()>,

Source

pub fn new() -> Self

Creates an empty combined saga store and action outbox.

Source

pub const fn saga_store(&self) -> &MemorySagaStore<S>

Returns the saga-state view.

Source

pub const fn action_store(&self) -> &MemorySagaActionStore<C>

Returns the action and timer view.

Trait Implementations§

Source§

impl<S: Debug, C> Debug for MemorySagaOutbox<S, C>
where C: Command<Output = ()> + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<S, C> Default for MemorySagaOutbox<S, C>
where C: Command<Output = ()>,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<S, C> TransactionalSagaOutbox<S, C> for MemorySagaOutbox<S, C>
where S: Send, C: Command<Output = ()>,

Source§

fn commit_transition<'a>( &'a self, saga_id: &'a SagaId, expected: ExpectedSagaVersion, saga: S, transition: MessageMetadata, actions: Vec<SagaAction<C>>, ) -> BoxFuture<'a, SoapResult<SagaCommitResult>>

Saves one state transition and its actions atomically.

Auto Trait Implementations§

§

impl<S, C> !Freeze for MemorySagaOutbox<S, C>

§

impl<S, C> RefUnwindSafe for MemorySagaOutbox<S, C>

§

impl<S, C> Send for MemorySagaOutbox<S, C>
where S: Send,

§

impl<S, C> Sync for MemorySagaOutbox<S, C>
where S: Send,

§

impl<S, C> Unpin for MemorySagaOutbox<S, C>
where S: Unpin, C: Unpin,

§

impl<S, C> UnsafeUnpin for MemorySagaOutbox<S, C>

§

impl<S, C> UnwindSafe for MemorySagaOutbox<S, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.