pub struct ErrorMessage {
    pub reason: String,
    pub hint: Option<String>,
    pub span: Option<Span>,
    pub display: Option<String>,
    pub location: Option<SourceLocation>,
}

Fields§

§reason: String

Plain text of the error

§hint: Option<String>

A list of suggestions of how to fix the error

§span: Option<Span>

Character offset of error origin within a source file

§display: Option<String>

Annotated code, containing cause and hints.

§location: Option<SourceLocation>

Line and column number of error origin within a source file

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Serialize this value into the given Serde serializer. 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).
Give this value the specified foreground colour
Give this value the specified background colour

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 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
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.