pub struct WsClientSocket { /* private fields */ }Implementations§
Source§impl WsClientSocket
impl WsClientSocket
pub fn new(websocket: WebSocketStream<MaybeTlsStream<TcpStream>>) -> Self
pub async fn send_msg(&mut self, msg: &ClientMessage) -> ConnectionResult<()>
pub async fn receive_msg(&mut self) -> ConnectionResult<Option<ServerMessage>>
pub async fn close(self) -> ConnectionResult<()>
Auto Trait Implementations§
impl !Freeze for WsClientSocket
impl !RefUnwindSafe for WsClientSocket
impl Send for WsClientSocket
impl Sync for WsClientSocket
impl Unpin for WsClientSocket
impl !UnwindSafe for WsClientSocket
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