pub(crate) enum ParseResult<T> {
    Success(T),
    Failure(Token, &'static str),
    Error(SpanString),
    ErrorReported,
}
Expand description

Represents the possible results of an attempted parse.

Variants

Success(T)

Parsed successfully.

Failure(Token, &'static str)

Arm failed to match. If the second parameter is token::Eof, it indicates an unexpected end of macro invocation. Otherwise, it indicates that no rules expected the given token.

Error(SpanString)

Fatal error (malformed macro?). Abort compilation.

ErrorReported

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.

Layout

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.