Struct reproto_core::Diagnostics
[−]
[src]
pub struct Diagnostics { pub source: Source, pub items: Vec<Diagnostic>, }
A collection of diagnostics emitted by the compiler.
Fields
source: Source
items: Vec<Diagnostic>
Methods
impl Diagnostics
[src]
pub fn new(source: Source) -> Self
[src]
Create a new diagnostics collection.
pub fn has_errors(&self) -> bool
[src]
Check if reporter is empty.
pub fn err<S: Into<Span>, E: Display>(&mut self, span: S, error: E)
[src]
Report an error.
pub fn info<S: Into<Span>, I: Display>(&mut self, span: S, info: I)
[src]
Report information.
pub fn symbol<P: Into<Span>>(
&mut self,
kind: SymbolKind,
span: P,
name: &RpName
)
[src]
&mut self,
kind: SymbolKind,
span: P,
name: &RpName
)
Register a symbol.
pub fn items(&self) -> Items
[src]
Iterate over all reporter items.
pub fn clear(&mut self)
[src]
Clear all existing diagnostics.
Trait Implementations
impl Debug for Diagnostics
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Diagnostics
[src]
fn clone(&self) -> Diagnostics
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more