Skip to main content

encode

Function encode 

Source
pub fn encode(
    text: &str,
    encoding: Encoding,
) -> Result<Vec<u8>, Box<Diagnostic>>
Expand description

Encodes text (byte order marks included) in encoding.

ยงErrors

As Encoder::new: an internal error (Y9000) for an encoding this version cannot write, never bytes in another encoding.