encode_text

Function encode_text 

Source
pub fn encode_text(
    input: &str,
    encoding: TextEncoding,
) -> Result<Vec<u8>, EncodeTextError>
Expand description

Encodes Unicode text into bytes using strict lossless behavior.

If any input character is not representable in the selected encoding, this function returns EncodeTextError instead of replacing data.