pub struct DiagnosticNote {
pub message: String,
pub span: Option<SourceSpan>,
}Expand description
Extra diagnostic context.
§Examples
use mos_core::DiagnosticNote;
let note = DiagnosticNote {
message: "while parsing heading".to_owned(),
span: None,
};
assert!(note.span.is_none());Fields§
§message: String§span: Option<SourceSpan>Trait Implementations§
Source§impl Clone for DiagnosticNote
impl Clone for DiagnosticNote
Source§fn clone(&self) -> DiagnosticNote
fn clone(&self) -> DiagnosticNote
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DiagnosticNote
impl RefUnwindSafe for DiagnosticNote
impl Send for DiagnosticNote
impl Sync for DiagnosticNote
impl Unpin for DiagnosticNote
impl UnsafeUnpin for DiagnosticNote
impl UnwindSafe for DiagnosticNote
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