pub struct ConnectionSender { /* private fields */ }
Implementations§
Source§impl ConnectionSender
impl ConnectionSender
Sourcepub fn send<R: for<'a> Deserialize<'a> + 'static + Send>(
&self,
method: impl Into<String>,
params: impl Serialize,
) -> Result<ResponseHandle<R>, SendError>
pub fn send<R: for<'a> Deserialize<'a> + 'static + Send>( &self, method: impl Into<String>, params: impl Serialize, ) -> Result<ResponseHandle<R>, SendError>
Sends the request to the other side of the connection.
Returns a ResponseHandle, that will return a response when received. Note that for the response to be received, the ConnectionReceiver has to be continuously looped over for new requests.
If the connection is already closed, error is returned.
Trait Implementations§
Source§impl Clone for ConnectionSender
impl Clone for ConnectionSender
Source§fn clone(&self) -> ConnectionSender
fn clone(&self) -> ConnectionSender
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ConnectionSender
impl RefUnwindSafe for ConnectionSender
impl Send for ConnectionSender
impl Sync for ConnectionSender
impl Unpin for ConnectionSender
impl UnwindSafe for ConnectionSender
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