pub struct ClientDispatcher<T: Transport, P> { /* private fields */ }
Expand description
A strongly typed client dispatcher.
Implementations§
Source§impl<T: Transport, P> ClientDispatcher<T, P>
impl<T: Transport, P> ClientDispatcher<T, P>
Sourcepub fn from_untyped(dispatcher: ClientDispatcher<T>) -> Self
pub fn from_untyped(dispatcher: ClientDispatcher<T>) -> Self
Creates a new client dispathcer from an untyped client dispatcher.
Sourcepub async fn run<H>(
&mut self,
handler: H,
) -> Result<(), DispatcherError<T::Error>>where
P: ClientProtocol<T, H>,
pub async fn run<H>(
&mut self,
handler: H,
) -> Result<(), DispatcherError<T::Error>>where
P: ClientProtocol<T, H>,
Runs the dispatcher with the provided handler.
Auto Trait Implementations§
impl<T, P> Freeze for ClientDispatcher<T, P>
impl<T, P> RefUnwindSafe for ClientDispatcher<T, P>
impl<T, P> Send for ClientDispatcher<T, P>where
P: Send,
impl<T, P> Sync for ClientDispatcher<T, P>
impl<T, P> Unpin for ClientDispatcher<T, P>
impl<T, P> UnwindSafe for ClientDispatcher<T, P>
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