pub trait HasDiagnosticsBase {
// Required methods
fn record(&self, diagnostic: Diagnostic);
fn as_ctx(&self) -> &RootContext;
}
Expand description
Low level machinery for diagnostics.
As a user you should only be using methods from Diagnostics
. It
may however be helpful to look at the implementors of this trait, as those
are also implementors of Diagnostics
.
Required Methods§
Sourcefn record(&self, diagnostic: Diagnostic)
fn record(&self, diagnostic: Diagnostic)
Base function for recording new diagnostics.
This should be used by implementors of new wrappers, users should use
high level functions like Diagnostics::error
or
Diagnostics::warning
instead.
Sourcefn as_ctx(&self) -> &RootContext
fn as_ctx(&self) -> &RootContext
Access to Context
, usually also available via std::ops::Deref
.