pub struct Context {
pub context: Vec<String>,
pub span: Span,
pub label: Option<String>,
pub span_indent: usize,
}Expand description
Context for a diagnostic.
Fields§
§context: Vec<String>The context for the diagnostic, sequential lines of the source where the last string is the relevant line for the diagnostic. Each line is at most 100 characters wide
span: SpanThe span of the context relevant to the diagnostic.
label: Option<String>The label for the span.
span_indent: usizeHow indented into the context the span starts.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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