Module combine::primitives [] [src]

Module containing the primitive types which is used to create and compose more advanced parsers.

Structs

IteratorStream

Wrapper around iterators which allows them to be treated as a stream. Returned by from_iter.

PointerOffset

Newtype around a pointer offset into a slice stream (&[T]/&str).

ReadStream
SliceStream

Newtype for constructing a stream from a slice where the items in the slice are not copyable.

Tracked

Error wrapper which lets parsers track which parser in a sequence of sub-parsers has emitted the error. Tracked::from can be used to construct this and it should otherwise be ignored outside of combine.

Enums

Consumed

Enum used to indicate if a parser consumed any items of the stream it was given as an input.

EasyError

Enum used to store information about an error that has occurred during parsing.

FastResult
Info
StringStreamError
UnexpectedParse

Traits

FullRangeStream

A RangeStream which is capable of providing it's entire range.

ParseError

Trait which defines a gluon parse error.

Parser

By implementing the Parser trait a type says that it can be used to parse an input stream into the type Output.

Positioned
Range
RangeStream

A RangeStream is an extension of Stream which allows for zero copy parsing.

RangeStreamOnce

A RangeStream is an extension of StreamOnce which allows for zero copy parsing.

Stream

A stream of tokens which can be duplicated

StreamError

StreamError represents a single error returned from a Stream or a Parser. Usually this is composed into a ParseError

StreamOnce

StreamOnce represents a sequence of items that can be extracted one by one.

Functions

uncons
uncons_while

Removes items from the input while predicate returns true.

Type Definitions

ConsumedResult

A Result type which has the consumed status flattened into the result. Conversions to and from std::result::Result can be done using result.into() or From::from(result)

ParseResult

A type alias over the specific Result type used by parsers to indicate wether they were successful or not. O is the type that is output on success. I is the specific stream type used in the parser.