struct DiagnosticSpan {
Show 13 fields file_name: String, byte_start: u32, byte_end: u32, line_start: usize, line_end: usize, column_start: usize, column_end: usize, is_primary: bool, text: Vec<DiagnosticSpanLine>, label: Option<String>, suggested_replacement: Option<String>, suggestion_applicability: Option<Applicability>, expansion: Option<Box<DiagnosticSpanMacroExpansion>>,
}

Fields

file_name: Stringbyte_start: u32byte_end: u32line_start: usize

1-based.

line_end: usizecolumn_start: usize

1-based, character offset.

column_end: usizeis_primary: bool

Is this a “primary” span – meaning the point, or one of the points, where the error occurred?

text: Vec<DiagnosticSpanLine>

Source text from the start of line_start to the end of line_end.

label: Option<String>

Label that should be placed at this location (if any)

suggested_replacement: Option<String>

If we are suggesting a replacement, this will contain text that should be sliced in atop this span.

suggestion_applicability: Option<Applicability>

If the suggestion is approximate

expansion: Option<Box<DiagnosticSpanMacroExpansion>>

Macro invocations that created the code at this span, if any.

Implementations

Trait Implementations

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

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: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 152 bytes