Struct selene_lib::rules::Diagnostic
source · [−]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 strmessage: Stringnotes: Vec<String>primary_label: Labelsecondary_labels: Vec<Label>Implementations
sourceimpl 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 RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnwindSafe for Diagnostic
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more