pub fn decode<'b>(
bytes: &'b [u8],
encoding: &'static Encoding
) -> Result<Cow<'b, str>>
Available on crate feature
encoding
only.Expand description
Decodes the provided bytes using the specified encoding.
Returns an error in case of malformed or non-representable sequences in the bytes
.