pub struct OneOf<I, C, E>(_, _);
Expand description

See one_of.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The type of errors emitted by this parser.

Parse a stream of tokens, yielding an output if possible, and any errors encountered along the way. Read more

Parse a stream of tokens, yielding an output if possible, and any errors encountered along the way. Unlike Parser::parse_recovery, this function will produce verbose debugging output as it executes. Read more

Parse a stream of tokens, yielding an output or any errors that were encountered along the way. Read more

Include this parser in the debugging output produced by Parser::parse_recovery_verbose. Read more

Map the output of this parser to another value. Read more

Map the output of this parser to another value, making use of the pattern’s span when doing so. Read more

Map the primary error of this parser to another value. Read more

Map the primary error of this parser to a result. If the result is Ok, the parser succeeds with that value. Read more

Map the primary error of this parser to another value, making use of the span from the start of the attempted to the point at which the error was encountered. Read more

After a successful parse, apply a fallible function to the output. If the function produces an error, treat it as a parsing error. Read more

Validate an output, producing non-terminal errors if it does not fulfil certain criteria. Read more

Label the pattern parsed by this parser for more useful error messages. Read more

Transform all outputs of this parser to a pretermined value. Read more

Left-fold the output of the parser into a single value. Read more

Right-fold the output of the parser into a single value. Read more

Ignore the output of this parser, yielding () as an output instead. Read more

Collect the output of this parser into a type implementing FromIterator. Read more

Parse one thing and then another thing, yielding a tuple of the two outputs. Read more

Parse one thing and then another thing, creating the second parser from the result of the first. If you only have a couple cases to handle, prefer Parser::or. Read more

Parse one thing and then another thing, attempting to chain the two outputs into a Vec. Read more

Flatten a nested collection. Read more

Parse one thing and then another thing, yielding only the output of the latter. Read more

Parse one thing and then another thing, yielding only the output of the former. Read more

Parse a pattern, but with an instance of another pattern on either end, yielding the output of the inner. Read more

Parse the pattern surrounded by the given delimiters. Read more

Parse one thing or, on failure, another thing. Read more

Apply a fallback recovery strategy to this parser should it fail. Read more

Attempt to parse something, but only if it exists. Read more

Parse a pattern any number of times (including zero times). Read more

Parse a pattern, separated by another, any number of times. Read more

Parse a pattern. Afterwards, the input stream will be rewound to its original state, as if parsing had not occurred. Read more

Box the parser, yielding a parser that performs parsing through dynamic dispatch. Read more

Attempt to convert the output of this parser into something else using Rust’s FromStr trait. Read more

For parsers that produce a Result as their output, unwrap the result (panicking if an Err is encountered). 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

The number of items that this chain link consists of.

Append the elements in this link to the chain.

An iterator over the items within this container, by value.

Iterate over the elements of the container (using internal iteration because GATs are unstable).

Returns the argument unchanged.

Calls U::from(self).

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

Parse a pattern, ignoring any amount of whitespace both before and after the pattern. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.