fn convert(&self) -> FontResult<CString> {
        match *self {
            RenderableText::Utf8(text) => Ok(CString::new(text).unwrap()),
            RenderableText::Latin1(bytes) => match CString::new(bytes) {
                Err(err) => Err(FontError::InvalidLatin1Text(err)),
                Ok(cstring) => Ok(cstring),
            },
            RenderableText::Char(ref string) => Ok(CString::new(string.as_bytes()).unwrap()),
        }
    }
/// Converts the given text to a c-style string if possible.
Converts the given text to a c-style string if possible.
Converts the given text to a c - style string if possible .
fn convert(&self) -> FontResult<CString> {
        match *self {
            RenderableText::Utf8(text) => Ok(CString::new(text).unwrap()),
            RenderableText::Latin1(bytes) => match CString::new(bytes) {
                Err(err) => Err(FontError::InvalidLatin1Text(err)),
                Ok(cstring) => Ok(cstring),
            },
            RenderableText::Char(ref string) => Ok(CString::new(string.as_bytes()).unwrap()),
        }
    }
fn convert ( & self ) -> FontResult < CString > { match * self { RenderableText :: Utf8 ( text ) => Ok ( CString :: new ( text ) . unwrap ( ) ) , RenderableText :: Latin1 ( bytes ) => match CString :: new ( bytes ) { Err ( err ) => Err ( FontError :: InvalidLatin1Text ( err ) ) , Ok ( cstring ) => Ok ( cstring ) , } , RenderableText :: Char ( ref string ) => Ok ( CString :: new ( string . as_bytes ( ) ) . unwrap ( ) ) , } }
Converts the given text to a c-style string if possible.
Converts the given text to a c - style string if possible .
&self
&self