pub trait HasDiagnosticsBase {
    // Required methods
    fn record(&self, diagnostic: Diagnostic);
    fn as_ctx(&self) -> &Context;
}
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§

source

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.

source

fn as_ctx(&self) -> &Context

Access to Context, usually also available via std::ops::Deref.

Implementations on Foreign Types§

source§

impl<T: HasDiagnosticsBase> HasDiagnosticsBase for &T

source§

fn as_ctx(&self) -> &Context

source§

fn record(&self, diagnostic: Diagnostic)

source§

impl<T: HasDiagnosticsBase> HasDiagnosticsBase for Rc<T>

source§

fn as_ctx(&self) -> &Context

source§

fn record(&self, diagnostic: Diagnostic)

source§

impl<T: HasDiagnosticsBase> HasDiagnosticsBase for Arc<T>

source§

fn record(&self, diagnostic: Diagnostic)

source§

fn as_ctx(&self) -> &Context

Implementors§