Expand description
See the README.md for the introduction and examples
§Parsers
Any rust item that implements the Parser trait can parse input by
calling try_parse()
Strings and slices implement the Parser trait:
Additionally the Parser trait is implemented for all functions with the following
signature.
Lastly, a few utility parsers are provided:
§Parser combinators
The associated methods on the Parser trait are used to combine parsers.
The sequence combinator is so common that it has a special form. Tuples of parsers implement
Parser such that the tuple parser succeeds if all its parsers succeed.
§Errors
parser-compose take a simple approach to error handling: If a parser fails, it returns None
Structs§
- AndThen
 - See 
and_then() - Byte
 - See 
byte - Fold
 - See 
fold() - Map
 - See 
map(). - Optional
 - See 
optional() - Or
 - See 
or() - Peek
 - See 
peek() - Predicate
 - See 
when() - Utf8
Scalar  - See 
utf8_scalar 
Traits§
- Parser
 - A trait for parsers
 - Repetition
Argument  - Trait used to specify how many times a parser should run.
 
Functions§
- byte
 - Returns a parser that recognizes the first byte in a slice if its value is in the specified range.
 - first_
slice_ item  - A parser that recognizes the first item in a slice.
 - first_
utf8_ scalar  - A parser that recognizes the first unicode scalar value at the start of a string slice.
 - utf8_
scalar  - Returns a parser that recognizes the first unicode scalar value in a string slice if its value is in the specified range
 
Type Aliases§
- Accumulate
Init  - A 
Foldinit function that uses aVecas an accumulator - Accumulate
Operation  - A 
Foldoperation function that uses aVecas an accumulator - Repeats
Init  - A 
Foldinit function that does not use an accumulator. - Repeats
Operation  - A 
Foldoperation function that does nothing with what is given to it