Struct tendril::stream::Decoder
[−]
[src]
pub struct Decoder<Sink, A> where Sink: TendrilSink<UTF8, A>, A: Atomicity {
// some fields omitted
}
Incrementally decode a byte stream to UTF-8.
This will write the decoded characters into new tendrils.
To validate UTF-8 without copying, see UTF8Validator
in this module.
Methods
impl<Sink, A> Decoder<Sink, A> where Sink: TendrilSink<UTF8, A>, A: Atomicity
fn new(encoding: EncodingRef, sink: Sink) -> Decoder<Sink, A>
Create a new incremental decoder.
fn into_sink(self) -> Sink
Consume the decoder and obtain the sink.