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