Skip to main content

encode

Function encode 

Source
pub fn encode(text: &str, target: TargetEncoding) -> Vec<u8> ⓘ
Expand description

Encode text into target. BOMs for utf-8-bom / utf-16le / utf-16be are prepended manually — encoding_rs never emits them.