Expand description
Terminology:
Name | Description |
---|---|
Stream | A structure that would produce Item when asked |
Parser | Something that will check that Item produced by Stream are correct |
Context | A structure that will manage Failure from Parser |
Token | Represent what a Parser return for Success |
Atom | A structure that contain information about the Failure or Error from a Parser |
Element | Something, generally an enumeration, that will contain all different kind of Atom |
Parsed | Enumeration that indicate result of a Parser |
Parse | A trait that all Parser implement, used to use a Parser |
Failure | Indicate a Parser didn’t validate the input |
Success | Indicate a Parser validate the input |
Error | Indicate a Parser encounter an irrecoverable error. |
Streaming | A trait that Stream implement to make their job |
Item | Item produced by a Stream , generally just an u8 |
Span | A delimited part of the Stream |
Contexting | A trait that all Context will implement, used to accumulate failure of Parser |
Structs§
- Success
- This represent a stand alone Success from Parsed result.
Enums§
- Core
Atom - Core context used to implement context for basic type like u8
- Parsed
- Parsed represent the result of a
parse()
. - Parsed
Aux - This is like Parsed but Succeed doesn’t contain stream
- Split
- Represent split Result
Traits§
- Acc
- This is very usefull to be use on combinator like fold.
For example,
.fold_bounds(.., Vec::new, Acc::acc)
. - Contexting
- Contexting is a trait used to report failure and error. This idea is too have a tree of context that will help final user to understand the error. It’s can also help for debugging purpose.
- Extend
- Abstracts something which can extend an
&mut self
. - Parse
- Parse is a trait that all parsers should implement. There is a blanked implementation for type that implement FnMut that match signature of parse(). This mean you can quickly use a function to implement a Parser.
- Provide
Element - This is an utily trait
- Push
- Abstracts something which can push Item into self
- Streaming
- This trait must be implement by all struct that want to be a stream for binator.
- TryAcc
- This is very usefull to be use on combinator like try_fold.
For example,
.try_fold_bounds(.., || Ok(Vec::new), TryAcc::try_acc)
. - TryExtend
- Abstracts something which can try extend
&mut self
. - TryPush
- Abstracts something you can try push item into
&mut self