pub fn as_text(&self) -> Result<&str> {
        match *self {
            Text(ref string) => Ok(string),
            Binary(ref data) => Ok(from_utf8(data)?),
        }
    }
/// this will try to convert binary data to utf8.
this will try to convert binary data to utf8.
this will try to convert binary data to utf8 .
pub fn as_text(&self) -> Result<&str> {
        match *self {
            Text(ref string) => Ok(string),
            Binary(ref data) => Ok(from_utf8(data)?),
        }
    }
pub fn as_text ( & self ) -> Result < & str > { match * self { Text ( ref string ) => Ok ( string ) , Binary ( ref data ) => Ok ( from_utf8 ( data ) ? ) , } }
this will try to convert binary data to utf8.
this will try to convert binary data to utf8 .
&self
&self