pub struct WebSocketStream<S> { /* private fields */ }Implementations§
Source§impl<S> WebSocketStream<S>
impl<S> WebSocketStream<S>
pub async fn send(&mut self, message: Message) -> Result<(), WsError>
pub async fn read(&mut self) -> Result<Message, WsError>
pub async fn close( &mut self, close_frame: Option<CloseFrame>, ) -> Result<(), WsError>
pub fn get_ref(&self) -> &S
pub fn get_mut(&mut self) -> &mut S
pub fn get_inner(self) -> WebSocket<SyncStream<S>>
Auto Trait Implementations§
impl<S> !Freeze for WebSocketStream<S>
impl<S> RefUnwindSafe for WebSocketStream<S>where
S: RefUnwindSafe,
impl<S> Send for WebSocketStream<S>where
S: Send,
impl<S> Sync for WebSocketStream<S>where
S: Sync,
impl<S> Unpin for WebSocketStream<S>where
S: Unpin,
impl<S> UnwindSafe for WebSocketStream<S>where
S: UnwindSafe,
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