pub struct Client<T: Transport> { /* private fields */ }
Expand description
A client endpoint.
Implementations§
Source§impl<T: Transport> Client<T>
impl<T: Transport> Client<T>
Sourcepub fn new(transport: T) -> (Self, ClientDispatcher<T>)
pub fn new(transport: T) -> (Self, ClientDispatcher<T>)
Creates a new client and dispatcher from a transport.
Sourcepub fn send_request<M>(
&self,
ordinal: u64,
request: &mut M,
) -> Result<T::SendFuture<'_>, EncodeError>
pub fn send_request<M>( &self, ordinal: u64, request: &mut M, ) -> Result<T::SendFuture<'_>, EncodeError>
Send a request.
Sourcepub fn send_transaction<M>(
&self,
ordinal: u64,
transaction: &mut M,
) -> Result<TransactionFuture<'_, T>, EncodeError>
pub fn send_transaction<M>( &self, ordinal: u64, transaction: &mut M, ) -> Result<TransactionFuture<'_, T>, EncodeError>
Send a request and await for a response.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Client<T>
impl<T> RefUnwindSafe for Client<T>
impl<T> Send for Client<T>
impl<T> Sync for Client<T>
impl<T> Unpin for Client<T>
impl<T> UnwindSafe for Client<T>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)