Struct nom8::combinator::And

source ·
pub struct And<F, G> { /* private fields */ }
Expand description

Implementation of Parser::and

Trait Implementations§

A parser takes in input type, and returns a Result containing either the remaining input and the output value, or an error
Treat &mut Self as a parser Read more
Returns the provided value if the child parser succeeds. Read more
Convert the parser’s output to another type using std::convert::From Read more
If the child parser was successful, return the consumed input as produced value. Read more
if the child parser was successful, return the consumed input with the output as a tuple. Functions similarly to recognize except it returns the parser output as well. Read more
Maps a function over the result of a parser Read more
Applies a function returning a Result over the result of a parser. Read more
Applies a function returning an Option over the result of a parser. Read more
Creates a second parser from the output of the first one, then apply over the rest of the input Read more
Applies a second parser over the output of the first one Read more
Returns the result of the child parser if it satisfies a verification function. Read more
If parsing fails, add context to the error Read more
Transforms Incomplete into Error Read more
Convert the parser’s error to another type using std::convert::From
Prints a message and the input if the parser fails. Read more
👎Deprecated since 8.0.0: Replaced with `nom8::sequence::tuple
Applies a second parser after the first one, return their results as a tuple Read more
👎Deprecated since 8.0.0: Replaced with `nom8::branch::alt
Applies a second parser over the input if the first one failed Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.