Struct tendril::stream::UTF8Validator [] [src]

pub struct UTF8Validator<Sink, A> where A: Atomicity {
    // some fields omitted
}

Incrementally validate a byte stream as UTF-8.

This will copy as little as possible — only the characters that span a chunk boundary.

Methods

impl<Sink, A> UTF8Validator<Sink, A> where Sink: TendrilSink<UTF8, A>, A: Atomicity

fn new(sink: Sink) -> UTF8Validator<Sink, A>

Create a new incremental validator.

fn into_sink(self) -> Sink

Consume the validator and obtain the sink.

Trait Implementations

impl<Sink, A> TendrilSink<Bytes, A> for UTF8Validator<Sink, A> where Sink: TendrilSink<UTF8, A>, A: Atomicity

fn process(&mut self, t: Tendril<Bytes, A>)

fn finish(&mut self)

fn error(&mut self, desc: Cow<'static, str>)