pub struct Mediator { /* private fields */ }Expand description
Default implementation of IMediator.
Holds a reference to the root ServiceProvider. Each send call creates
a per-request scope so Scoped services (e.g. DbContext) are resolved fresh.
Implementations§
Trait Implementations§
Source§impl IMediator for Mediator
impl IMediator for Mediator
Source§fn send<'life0, 'async_trait, T, R>(
&'life0 self,
req: T,
) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
fn send<'life0, 'async_trait, T, R>( &'life0 self, req: T, ) -> Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'async_trait>>
Send a request and return its structured response.
Auto Trait Implementations§
impl !RefUnwindSafe for Mediator
impl !UnwindSafe for Mediator
impl Forget for Mediator
impl Freeze for Mediator
impl Send for Mediator
impl Sync for Mediator
impl Unpin for Mediator
impl UnsafeUnpin for Mediator
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