Expand description
Various combinators which do not fit anywhere else.
Structs§
- AndThen
- AnyPartial
State - AnyPartial
State Parser - AnySend
Partial State - AnySend
Partial State Parser - AnySend
Sync Partial State - AnySend
Sync Partial State Parser - Factory
- FlatMap
- FromStr
- Ignore
- Input
Converter - Lazy
- Look
Ahead - Map
- MapInput
- NoPartial
- NotFollowed
By - Opaque
- Recognize
- Spanned
- Try
Enums§
Traits§
Functions§
- and_
then - Equivalent to
p.and_then(f). - any_
partial_ state - Returns a parser where
P::PartialStateis boxed. Useful as a way to avoid writing the type since it can get very large after combining a few parsers. - any_
send_ partial_ state - Returns a parser where
P::PartialStateis boxed. Useful as a way to avoid writing the type since it can get very large after combining a few parsers. - any_
send_ sync_ partial_ state - Returns a parser where
P::PartialStateis boxed. Useful as a way to avoid writing the type since it can get very large after combining a few parsers. - attempt
attempt(p)behaves aspexcept it always acts asppeeked instead of committed on its parse.- factory
- Constructs the parser lazily on each
parse_*call. This is similar tolazybut it takesInputas an argument and allows different parsers to be returned on each call topwhile still reporting the correct errors. - flat_
map - Equivalent to
p.flat_map(f). - from_
str - Takes a parser that outputs a string like value (
&str,String,&[u8]orVec<u8>) and parses it usingstd::str::FromStr. Errors if the output ofparseris not UTF-8 or ifFromStr::from_strreturns an error. - input_
converter - lazy
- Constructs the parser lazily on each
parse_*call. Can be used to effectively reduce the size of deeply nested parsers as only the function producing the parser is stored. - look_
ahead look_ahead(p)acts aspbut doesn’t consume input on success.- map
- Equivalent to
p.map(f). - map_
input - Equivalent to
p.map_input(f). - no_
partial - not_
followed_ by - Succeeds only if
parserfails. Never consumes any input. - opaque
- Creates a parser from a function which takes a function that are given the actual parser.
Though convoluted this makes it possible to hide the concrete parser type without
Boxor losing the full information about the parser as is the case ofparser. - recognize
- Constructs a parser which returns the tokens parsed by
parseraccumulated inF: Extend<Input::Token>instead ofP::Output. - spanned
- Equivalent to
p.spanned().
Type Aliases§
- FnOpaque
- Alias over
Opaquewhere the function can be a plain function pointer (does not need to capture any values)