pub fn to_str(&self) -> Result<&str, ()> {
        match self.inner {
            protocol::Message::Text(ref s) => Ok(s),
            _ => Err(()),
        }
    }
/// Try to get a reference to the string text, if this is a Text message.
Try to get a reference to the string text, if this is a Text message.
Try to get a reference to the string text if this is a Text message .
pub fn to_str(&self) -> Result<&str, ()> {
        match self.inner {
            protocol::Message::Text(ref s) => Ok(s),
            _ => Err(()),
        }
    }
pub fn to_str ( & self ) -> Result < & str , ( ) > { match self . inner { protocol :: Message :: Text ( ref s ) => Ok ( s ) , _ => Err ( ( ) ) , } }
Try to get a reference to the string text, if this is a Text message.
Try to get a reference to the string text if this is a Text message .
&self
&self