pub struct Diagnostic {
pub line_num: u32,
pub line: String,
pub message: String,
pub underline_start: u32,
pub underline_width: u32,
pub source_file: SourceFile,
}Fields§
§line_num: u32§line: String§message: String§underline_start: u32§underline_width: u32§source_file: SourceFileImplementations§
Source§impl Diagnostic
impl Diagnostic
pub fn plain_text(&self) -> String
pub fn plain_text_with<C: DiagnosticColor>(&self, colorizer: C) -> String
Trait Implementations§
Source§impl Clone for Diagnostic
impl Clone for Diagnostic
Source§fn clone(&self) -> Diagnostic
fn clone(&self) -> Diagnostic
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Diagnostic
impl Debug for Diagnostic
Source§impl From<Diagnostic> for Vec<Diagnostic>
impl From<Diagnostic> for Vec<Diagnostic>
Source§fn from(diagnostic: Diagnostic) -> Self
fn from(diagnostic: Diagnostic) -> Self
Converts to this type from the input type.
Source§impl PartialEq for Diagnostic
impl PartialEq for Diagnostic
impl Eq for Diagnostic
impl StructuralPartialEq for Diagnostic
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