pub struct WebSocketSender { /* private fields */ }Expand description
Sends to one WebSocket client; cheap to clone, usable from any thread.
Implementations§
Source§impl WebSocketSender
impl WebSocketSender
Sourcepub fn ping(&self, payload: &[u8]) -> Result<(), String>
pub fn ping(&self, payload: &[u8]) -> Result<(), String>
Send a ping (at most 125 bytes); the client’s pong is consumed by
WebSocketConnection::recv.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WebSocketSender
impl RefUnwindSafe for WebSocketSender
impl Send for WebSocketSender
impl Sync for WebSocketSender
impl Unpin for WebSocketSender
impl UnsafeUnpin for WebSocketSender
impl UnwindSafe for WebSocketSender
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