pub trait Decoder: Iterator<Item = char> { // Required methods fn next_n(&mut self, n: usize) -> Vec<char>; fn fill_n(&mut self, n: usize, target: &mut [char]) -> usize; }
Provide a common interface for stream decoders.
Fetch a sequence of characters. The returned array will have the number of characters requested, or fewer if the end of the stream is encountered.
Given a mutable array start filling it from position zero and fill up to the specified number of characters. The actual number of characters filled (which may be less than requested) is returned.