pub struct TypedHandler<E, H>{ /* private fields */ }Expand description
Adapter that lifts a typed Handler<E> into an ErasedHandler.
Implementations§
Trait Implementations§
Source§impl<E, H> ErasedHandler for TypedHandler<E, H>
impl<E, H> ErasedHandler for TypedHandler<E, H>
Source§fn event_type(&self) -> &'static str
fn event_type(&self) -> &'static str
Event type this handler reacts to, matching
Event::EVENT_TYPE.Source§fn handle<'a>(
&'a self,
envelope: &'a OutboxEnvelope,
ctx: &'a HandlerContext,
) -> BoxFuture<'a, Result<(), OutboxError>>
fn handle<'a>( &'a self, envelope: &'a OutboxEnvelope, ctx: &'a HandlerContext, ) -> BoxFuture<'a, Result<(), OutboxError>>
Decode the envelope and dispatch to the underlying typed handler.
Auto Trait Implementations§
impl<E, H> Freeze for TypedHandler<E, H>
impl<E, H> RefUnwindSafe for TypedHandler<E, H>where
H: RefUnwindSafe,
impl<E, H> Send for TypedHandler<E, H>
impl<E, H> Sync for TypedHandler<E, H>
impl<E, H> Unpin for TypedHandler<E, H>
impl<E, H> UnsafeUnpin for TypedHandler<E, H>
impl<E, H> UnwindSafe for TypedHandler<E, H>where
H: RefUnwindSafe,
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