pub fn into_data(self) -> Vec<u8> {
        match self {
            Message::Text(string) => string.into_bytes(),
            Message::Binary(data) | Message::Ping(data) | Message::Pong(data) => data,
            Message::Close(None) => Vec::new(),
            Message::Close(Some(frame)) => frame.reason.into_owned().into_bytes(),
        }
    }
/// Consume the WebSocket and return it as binary data.
Consume the WebSocket and return it as binary data.
Consume the WebSocket and return it as binary data .
pub fn into_data(self) -> Vec<u8> {
        match self {
            Message::Text(string) => string.into_bytes(),
            Message::Binary(data) | Message::Ping(data) | Message::Pong(data) => data,
            Message::Close(None) => Vec::new(),
            Message::Close(Some(frame)) => frame.reason.into_owned().into_bytes(),
        }
    }
pub fn into_data ( self ) -> Vec < u8 > { match self { Message :: Text ( string ) => string . into_bytes ( ) , Message :: Binary ( data ) | Message :: Ping ( data ) | Message :: Pong ( data ) => data , Message :: Close ( None ) => Vec :: new ( ) , Message :: Close ( Some ( frame ) ) => frame . reason . into_owned ( ) . into_bytes ( ) , } }
Consume the WebSocket and return it as binary data.
Consume the WebSocket and return it as binary data .
self
self