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>
Convert the raw Message into the appropriate request type by delegating
to the associated |Request| type of |Interface|, and then invoke the
receiver.
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more