Struct chumsky::BoxedParser[][src]

#[repr(transparent)]
pub struct BoxedParser<'a, I, O, E: Error<I>>(_);
Expand description

See Parser::boxed.

This type is a repr(transparent) wrapper around its inner value.

Due to current implementation details, the inner value is not, in fact, a Box, but is an Rc to facilitate efficient cloning. This is likely to change in the future. Unlike Box, Rc has no size guarantees: although it is currently the same size as a raw pointer.

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 with all the bells & whistles. You can use this to implement your own parser combinators. Note that both the signature and semantic requirements of this function are very likely to change in later versions. Where possible, prefer more ergonomic combinators provided elsewhere in the crate rather than implementing your own. Read more

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

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

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

Map the output of this parser to another value, making use of the pattern’s span.

Map the primary error of this parser to another value. 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, where the output is of type (_, Vec<_>). Read more

Right-fold the output of the parser into a single value, where the output is of type (Vec<_>, _). Read more

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

Collect the output of this parser into a collection. 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, attempting to chain the two outputs into a Vec. Read more

Flatten a nested collection.

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 the pattern surrounded by the given delimiters, performing error recovery where possible. Read more

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

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

Parse an expression any number of times (including zero times). Read more

Parse an expression at least a given number of times. Read more

Box the parser, yielding a parser that performs parsing through dynamic dispatch. 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.

Performs the conversion.

Performs the conversion.

Parse a pattern, allowing whitespace both before and after.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.