Struct utf8::LossyDecoder
[−]
[src]
pub struct LossyDecoder<F: FnMut(&str)> { // some fields omitted }
A push-based, lossy decoder for UTF-8. Errors are replaced with the U+FFFD replacement character.
Methods
impl<F: FnMut(&str)> LossyDecoder<F>
[src]
fn new(push_str: F) -> Self
fn feed(&mut self, input: &[u8])
Feed more bytes into the decoder.
If the UTF-8 byte sequence for one code point was split into this bytes chunk and previous bytes chunks, it will be correctly pieced back together.
fn end(self)
Signal the end of the input.
If the last byte chunk ended with an incomplete byte sequence for a code point, this is an error and a replacement character is emitted.