pub fn len(&self) -> usize {
        match *self {
            Message::Text(ref string) => string.len(),
            Message::Binary(ref data) | Message::Ping(ref data) | Message::Pong(ref data) => {
                data.len()
            }
            Message::Close(ref data) => data.as_ref().map(|d| d.reason.len()).unwrap_or(0),
        }
    }
/// Get the length of the WebSocket message.
Get the length of the WebSocket message.
Get the length of the WebSocket message .
pub fn len(&self) -> usize {
        match *self {
            Message::Text(ref string) => string.len(),
            Message::Binary(ref data) | Message::Ping(ref data) | Message::Pong(ref data) => {
                data.len()
            }
            Message::Close(ref data) => data.as_ref().map(|d| d.reason.len()).unwrap_or(0),
        }
    }
pub fn len ( & self ) -> usize { match * self { Message :: Text ( ref string ) => string . len ( ) , Message :: Binary ( ref data ) | Message :: Ping ( ref data ) | Message :: Pong ( ref data ) => { data . len ( ) } Message :: Close ( ref data ) => data . as_ref ( ) . map ( | d | d . reason . len ( ) ) . unwrap_or ( 0 ) , } }
Get the length of the WebSocket message.
Get the length of the WebSocket message .
&self
&self