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