[−][src]Struct language_reporting::Diagnostic
Represents a diagnostic message and associated child messages.
Fields
severity: SeverityThe overall severity of the diagnostic
code: Option<String>An optional code that identifies this diagnostic.
message: StringThe main message associated with this diagnostic
labels: Vec<Label<Span>>The labelled spans marking the regions of code that cause this diagnostic to be raised
Methods
impl<Span: ReportingSpan> Diagnostic<Span>[src]
impl<Span: ReportingSpan> Diagnostic<Span>pub fn new<S: Into<String>>(severity: Severity, message: S) -> Diagnostic<Span> | [src] |
pub fn new_bug<S: Into<String>>(message: S) -> Diagnostic<Span> | [src] |
pub fn new_error<S: Into<String>>(message: S) -> Diagnostic<Span> | [src] |
pub fn new_warning<S: Into<String>>(message: S) -> Diagnostic<Span> | [src] |
pub fn new_note<S: Into<String>>(message: S) -> Diagnostic<Span> | [src] |
pub fn new_help<S: Into<String>>(message: S) -> Diagnostic<Span> | [src] |
pub fn with_code<S: Into<String>>(self, code: S) -> Diagnostic<Span> | [src] |
pub fn with_label(self, label: Label<Span>) -> Diagnostic<Span> | [src] |
pub fn with_labels<Labels: IntoIterator<Item = Label<Span>>>( | [src] |
Trait Implementations
impl<Span: Clone + ReportingSpan> Clone for Diagnostic<Span>[src]
impl<Span: Clone + ReportingSpan> Clone for Diagnostic<Span>fn clone(&self) -> Diagnostic<Span> | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source. Read more
impl<Span: Debug + ReportingSpan> Debug for Diagnostic<Span>[src]
impl<Span: Debug + ReportingSpan> Debug for Diagnostic<Span>Auto Trait Implementations
impl<Span> Send for Diagnostic<Span> where
Span: Send,
impl<Span> Send for Diagnostic<Span> where
Span: Send, impl<Span> Sync for Diagnostic<Span> where
Span: Sync,
impl<Span> Sync for Diagnostic<Span> where
Span: Sync, Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, impl<T> From for T[src]
impl<T> From for Timpl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T | [src] |