pub fn encode_to_slice<T: Textcode>( src: impl AsRef<str>, dst: &mut [u8], ) -> usize
Encodes UTF-8 string to the target encoding slice. Returns the number of bytes written.