[][src]Function ucs2::encode_with

pub fn encode_with<F>(input: &str, output: F) -> Result<(), Error> where
    F: FnMut(u16) -> Result<(), Error>, 

Encode UTF-8 string to UCS-2 with a custom callback function.

output is a function which receives every encoded character.