pub struct Diagnostic {
pub code: &'static str,
pub message: String,
pub notes: Vec<String>,
pub primary_label: Label,
pub secondary_labels: Vec<Label>,
}
Fields§
§code: &'static str
§message: String
§notes: Vec<String>
§primary_label: Label
§secondary_labels: Vec<Label>
Implementations§
Source§impl Diagnostic
impl Diagnostic
pub fn new(code: &'static str, message: String, primary_label: Label) -> Self
pub fn new_complete( code: &'static str, message: String, primary_label: Label, notes: Vec<String>, secondary_labels: Vec<Label>, ) -> Self
pub fn into_codespan_diagnostic( self, file_id: FileId, severity: CodespanSeverity, ) -> CodespanDiagnostic<FileId>
pub fn start_position(&self) -> u32
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Diagnostic
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnwindSafe for Diagnostic
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