pub struct DevMockingDispatcher { /* private fields */ }Expand description
Production dispatcher wrapped with per-run activity mocking.
Installed in place of the bare [WorkerActivityDispatcher] only when the
dev surface is commissioned. With no mock registered for a dispatch it is a
transparent pass-through, so a server running the dev surface but with no
active mocks behaves exactly as production.
Implementations§
Source§impl DevMockingDispatcher
impl DevMockingDispatcher
Sourcepub fn new(
inner: Arc<dyn ActivityDispatcher>,
registry: ActivityMockRegistry,
) -> Self
pub fn new( inner: Arc<dyn ActivityDispatcher>, registry: ActivityMockRegistry, ) -> Self
Wrap inner with the shared mock registry.
Trait Implementations§
Source§impl ActivityDispatcher for DevMockingDispatcher
impl ActivityDispatcher for DevMockingDispatcher
Auto Trait Implementations§
impl !RefUnwindSafe for DevMockingDispatcher
impl !UnwindSafe for DevMockingDispatcher
impl Freeze for DevMockingDispatcher
impl Send for DevMockingDispatcher
impl Sync for DevMockingDispatcher
impl Unpin for DevMockingDispatcher
impl UnsafeUnpin for DevMockingDispatcher
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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