Enum ron_reboot::utf8_parser::ErrorTree[][src]

pub enum ErrorTree<I> {
    Base {
        location: I,
        kind: BaseErrorKind,
    },
    Stack {
        base: Box<Self>,
        finalized: bool,
        contexts: Vec<(I, StackContext)>,
    },
    Alt(Vec<Self>),
}

Variants

Base

A specific error event at a specific location. Often this will indicate that something like a tag or character was expected at that location.

Fields of Base

location: I

The location of this error in the input

kind: BaseErrorKind

The specific error that occurred

Stack

A stack indicates a chain of error contexts was provided. The stack should be read “backwards”; that is, errors earlier in the Vec occurred “sooner” (deeper in the call stack).

Fields of Stack

base: Box<Self>

The original error

finalized: bool

Whether it was indicated that the “final” useful context has been pushed onto the stack

contexts: Vec<(I, StackContext)>

The stack of contexts attached to that error

Alt(Vec<Self>)

A series of parsers were tried at the same location (for instance, via the alt2 combinator) and all of them failed.

Tuple Fields of Alt

0: Vec<Self>

Implementations

Similar to append: Create a new error with some added context

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

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

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

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

Performs the conversion.

Performs the conversion.

Converts the given value to a String. 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.