pub struct SubscribingHandler<H, M>where
H: Handler<M>,{ /* private fields */ }Expand description
Provides the Subscriber and Handler
traits for a wrapped Handler delegate.
Implementations§
Source§impl<H, M> SubscribingHandler<H, M>where
H: Handler<M>,
impl<H, M> SubscribingHandler<H, M>where
H: Handler<M>,
Sourcepub fn new(handler: H) -> SubscribingHandler<H, M>
pub fn new(handler: H) -> SubscribingHandler<H, M>
Creates a SubscribingHandler from a
given Handler.
Source§impl<H, M> SubscribingHandler<H, M>where
H: Handler<M> + 'static,
M: 'static,
impl<H, M> SubscribingHandler<H, M>where
H: Handler<M> + 'static,
M: 'static,
Sourcepub fn into_heap(self) -> Subscriber<M>
pub fn into_heap(self) -> Subscriber<M>
Wraps the SubscribingHandler in a Box and heap::Subscriber.
Trait Implementations§
Source§impl<H, M> From<H> for SubscribingHandler<H, M>where
H: Handler<M>,
impl<H, M> From<H> for SubscribingHandler<H, M>where
H: Handler<M>,
Source§impl<H, M> Handler<M> for SubscribingHandler<H, M>where
H: Handler<M>,
impl<H, M> Handler<M> for SubscribingHandler<H, M>where
H: Handler<M>,
Source§impl<H, M> Hash for SubscribingHandler<H, M>
impl<H, M> Hash for SubscribingHandler<H, M>
Source§impl<H, M> PartialEq for SubscribingHandler<H, M>
impl<H, M> PartialEq for SubscribingHandler<H, M>
Source§impl<H, M> Subscriber<M> for SubscribingHandler<H, M>where
H: Handler<M>,
impl<H, M> Subscriber<M> for SubscribingHandler<H, M>where
H: Handler<M>,
Source§fn receive(&self, message: &M)
fn receive(&self, message: &M)
Receives a borrowed message for the
Subscriber to process.impl<H, M> Eq for SubscribingHandler<H, M>
Auto Trait Implementations§
impl<H, M> Freeze for SubscribingHandler<H, M>where
H: Freeze,
impl<H, M> RefUnwindSafe for SubscribingHandler<H, M>where
H: RefUnwindSafe,
M: RefUnwindSafe,
impl<H, M> Send for SubscribingHandler<H, M>
impl<H, M> Sync for SubscribingHandler<H, M>
impl<H, M> Unpin for SubscribingHandler<H, M>
impl<H, M> UnwindSafe for SubscribingHandler<H, M>where
H: UnwindSafe,
M: UnwindSafe,
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