pub struct Sender<T> { /* private fields */ }
Available on crate feature
ws
only.Expand description
Sending end of WebSocket transport.
Trait Implementations§
Source§impl<T> TransportSenderT for Sender<T>
impl<T> TransportSenderT for Sender<T>
Source§fn send(
&mut self,
body: String,
) -> impl Future<Output = Result<(), Self::Error>> + Send
fn send( &mut self, body: String, ) -> impl Future<Output = Result<(), Self::Error>> + Send
Sends out a request. Returns a Future
that finishes when the request has been
successfully sent.
Source§fn send_ping(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send
fn send_ping(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send
Sends out a ping request. Returns a Future
that finishes when the request has been
successfully sent.
Auto Trait Implementations§
impl<T> Freeze for Sender<T>
impl<T> !RefUnwindSafe for Sender<T>
impl<T> Send for Sender<T>where
T: Send,
impl<T> Sync for Sender<T>where
T: Send,
impl<T> Unpin for Sender<T>
impl<T> !UnwindSafe for Sender<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