pub fn send<IN>(&mut self, data: IN)
    where
        IN: Into<Text>,
    {
        if let Ok(body) = data.into() {
            let result = self.ws.send_with_str(&body);

            if result.is_err() {
                self.notification.emit(WebSocketStatus::Error);
            }
        }
    }
/// Sends data to a WebSocket connection.
Sends data to a WebSocket connection.
Sends data to a WebSocket connection .
pub fn send<IN>(&mut self, data: IN)
    where
        IN: Into<Text>,
    {
        if let Ok(body) = data.into() {
            let result = self.ws.send_with_str(&body);
            if result.is_err() {
                self.notification.emit(WebSocketStatus::Error);
            }
        }
    }
pub fn send < IN > ( & mut self , data : IN ) where IN : Into < Text > , { if let Ok ( body ) = data . into ( ) { let result = self . ws . send_with_str ( & body ) ; if result . is_err ( ) { self . notification . emit ( WebSocketStatus :: Error ) ; } } }
Sends data to a WebSocket connection.
Sends data to a WebSocket connection .
&mut self
data
IN
&mut self
data
IN