[][src]Type Definition kul::common::stream::Parser

type Parser<Extra = (), CombinerError = ()> = ParserStruct<CharClassifier, DatumAllocator<Extra>, OperatorBindings<Extra, CombinerError>>;

A Parser for parsing inputs that are chunks from a streaming source, as a sequence of String chunks yielded by an Iterator, that uses: the default characters as delimiters, Boxes to allocate the Datums in ASTs returned from parsing, and HashMaps to bind operator sub-forms to Combiner macro functions.

The AST values returned from parsing are zero-copy with regard to the input parts they refer to, achieved by shared ownership, i.e. Rc-wrapping, of the input String chunks.

You must decide which types you want to use in the Datum::Extra variant and for any errors returned by your macro/"combiner" functions in the Error::FailedCombiner variant. If unsure, the () type is suitable for either or both, and this is their default.