pub struct RustcSpan {Show 13 fields
pub file_name: String,
pub byte_start: usize,
pub byte_end: usize,
pub line_start: usize,
pub line_end: usize,
pub column_start: usize,
pub column_end: usize,
pub is_primary: bool,
pub text: Vec<RustcSpanText>,
pub label: Option<String>,
pub suggested_replacement: Option<String>,
pub suggestion_applicability: Option<String>,
pub expansion: Option<Box<RustcExpansion>>,
}Expand description
A source code span in a rustc diagnostic
Fields§
§file_name: StringSource file path
byte_start: usizeByte offset start (0-indexed)
byte_end: usizeByte offset end (0-indexed)
line_start: usizeLine number start (1-indexed)
line_end: usizeLine number end (1-indexed)
column_start: usizeColumn number start (1-indexed)
column_end: usizeColumn number end (1-indexed)
is_primary: boolWhether this is the primary location
text: Vec<RustcSpanText>Text snippets
label: Option<String>Optional label text
suggested_replacement: Option<String>Optional suggested replacement
suggestion_applicability: Option<String>Applicability of suggestion
expansion: Option<Box<RustcExpansion>>Macro expansion context
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RustcSpan
impl<'de> Deserialize<'de> for RustcSpan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RustcSpan
impl StructuralPartialEq for RustcSpan
Auto Trait Implementations§
impl Freeze for RustcSpan
impl RefUnwindSafe for RustcSpan
impl Send for RustcSpan
impl Sync for RustcSpan
impl Unpin for RustcSpan
impl UnwindSafe for RustcSpan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more