Expand description
Module containing the primitive types which is used to create and compose more advanced parsers
Structs§
- Byte
Position - Struct which represents a position in a byte stream
- Iterator
Stream - Wrapper around iterators which allows them to be treated as a stream.
Returned by
from_iter. - Parse
Error - Struct which hold information about an error that occured at a specific position.
Can hold multiple instances of
Errorif more that one error occured at the position. - Source
Position - Struct which represents a position in a source file
- State
- The
State<I>struct keeps track of the current position in the streamI
Enums§
- Consumed
- Enum used to indicate if a parser consumed any items of the stream it was given as an input
- Error
- Enum used to store information about an error that has occured
- Info
- Enum holding error information
As there is implementations of
FromforT: Positioner,Stringand&'static strthe constructor need not be used directly as callingmsg.into()should turn a message into the correctInfovariant
Traits§
- Parser
- By implementing the
Parsertrait a type says that it can be used to parse an input stream into the typeOutput. - Positioner
Positionerrepresents the operations needed to update a position given an item from the stream When implementing stream for custom token type this must be implemented for that token to allow the position to be updated- Stream
- A stream is a sequence of items that can be extracted one by one
Functions§
- from_
iter - Converts an
Iteratorinto a stream.
Type Aliases§
- Parse
Result - A type alias over the specific
Resulttype used by parsers to indicate wether they were successful or not.Ois the type that is output on successIis the specific stream type used in the parserTis the item type ofI, this parameter will be removed once type declarations are allowed to have trait bounds