Skip to main content

DefaultCommandDispatcher

Struct DefaultCommandDispatcher 

Source
pub struct DefaultCommandDispatcher<CH, IS, U> { /* private fields */ }

Implementations§

Source§

impl<CH, IS, U> DefaultCommandDispatcher<CH, IS, U>
where CH: CommandHasher, IS: IdempotencyService, U: UnitOfWorkFactory<Uow = IS::Uow>,

Source

pub fn new(command_hasher: CH, idempotency_service: IS, uow_factory: U) -> Self

Source

pub fn command_hasher(&self) -> &CH

Source

pub fn idempotency_service(&self) -> &IS

Trait Implementations§

Source§

impl<CH, IS, U> CommandDispatcher for DefaultCommandDispatcher<CH, IS, U>
where CH: CommandHasher, IS: IdempotencyService, U: UnitOfWorkFactory<Uow = IS::Uow>,

Source§

type Uow = <IS as IdempotencyService>::Uow

Source§

async fn dispatch<H>( &self, handler: &H, request_context: &RequestContext, command: H::Command, ) -> Result<H::Output, CommandDispatchError<H::Error>>
where H: CommandHandler<Uow = Self::Uow>, H::Command: Command,

Source§

impl<CH: Debug, IS: Debug, U: Debug> Debug for DefaultCommandDispatcher<CH, IS, U>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<CH, IS, U> Freeze for DefaultCommandDispatcher<CH, IS, U>
where CH: Freeze, IS: Freeze, U: Freeze,

§

impl<CH, IS, U> RefUnwindSafe for DefaultCommandDispatcher<CH, IS, U>

§

impl<CH, IS, U> Send for DefaultCommandDispatcher<CH, IS, U>
where CH: Send, IS: Send, U: Send,

§

impl<CH, IS, U> Sync for DefaultCommandDispatcher<CH, IS, U>
where CH: Sync, IS: Sync, U: Sync,

§

impl<CH, IS, U> Unpin for DefaultCommandDispatcher<CH, IS, U>
where CH: Unpin, IS: Unpin, U: Unpin,

§

impl<CH, IS, U> UnwindSafe for DefaultCommandDispatcher<CH, IS, U>
where CH: UnwindSafe, IS: UnwindSafe, U: UnwindSafe,

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> Same for T

Source§

type Output = T

Should always be Self
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.