Skip to main content

to_string

Function to_string 

Source
pub fn to_string<F: Encoding>(src: &[F::Unit]) -> Result<String, FromUtf8Error>
Expand description

Transcodes to an owned String.

ยงErrors

When the source decodes to invalid scalar values (e.g. lone surrogates), which would make the resulting UTF-8 invalid.