pub struct Diagnostic { /* private fields */ }
Expand description

A struct representing a diagnostic to emit to the end-user as an error.

Implementations§

Generate a Diagnostic from an informational message with no Span

Generate a Diagnostic from a Span and an informational message

Generate a Diagnostic from the span of any tokenizable object and a message

Attempt to generate a Diagnostic from a vector of other Diagnostic instances. If the Vec is empty, returns Ok(()), otherwise returns the new Diagnostic

Immediately trigger a panic from this Diagnostic

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.
Write self to the given TokenStream. Read more
Convert self directly into a TokenStream object. Read more
Convert self directly into a TokenStream object. 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

Returns the argument unchanged.

Calls U::from(self).

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

Returns a Span covering the complete contents of this syntax tree node, or Span::call_site() if this node is empty. 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.