pub struct RequestDispatcher<I: Interface, R: RequestReceiver<I>> { /* private fields */ }
Expand description
Implements a |MessageReceiver| that can decode a request into the appropriate request type for an |Interface|, and then invoke an |Implementation|
This struct essentially is the glue that sits in between the generic |MessageReceiver| trait that is used to dispatch raw message buffers and the higher level |RequestReceiver| that operates on the decoded request enums.
Implementations§
Source§impl<I: Interface, R: RequestReceiver<I>> RequestDispatcher<I, R>
impl<I: Interface, R: RequestReceiver<I>> RequestDispatcher<I, R>
Trait Implementations§
Source§impl<I: Interface, R: RequestReceiver<I>> MessageReceiver for RequestDispatcher<I, R>
impl<I: Interface, R: RequestReceiver<I>> MessageReceiver for RequestDispatcher<I, R>
Convert the raw Message into the appropriate request type by delegating to the associated |Request| type of |Interface|, and then invoke the receiver.
Auto Trait Implementations§
impl<I, R> Freeze for RequestDispatcher<I, R>where
R: Freeze,
impl<I, R> RefUnwindSafe for RequestDispatcher<I, R>where
R: RefUnwindSafe,
I: RefUnwindSafe,
impl<I, R> Send for RequestDispatcher<I, R>
impl<I, R> Sync for RequestDispatcher<I, R>
impl<I, R> Unpin for RequestDispatcher<I, R>
impl<I, R> UnwindSafe for RequestDispatcher<I, R>where
R: UnwindSafe,
I: 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