Struct chumsky::stream::Stream [−][src]
pub struct Stream<'a, I, S: Span, Iter: Iterator<Item = (I, S)> + ?Sized = dyn StreamExtend<(I, S)> + 'a> { /* fields omitted */ }
Expand description
A type that represents a stream of input tokens. Unlike Iterator
, this type supports backtracking and a few
other features required by the crate.
Implementations
Create a new stream from an iterator of (Token, Span)
tuples. A span representing the end of input must also
be provided.
There is no requirement that spans must map exactly to the position of inputs in the stream, but they should be non-overlapping and should appear in a monotonically-increasing order.