paralegal_policy::diagnostics

Trait HasDiagnosticsBase

Source
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§

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) -> &RootContext

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) -> &RootContext

Source§

fn record(&self, diagnostic: Diagnostic)

Source§

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

Source§

fn as_ctx(&self) -> &RootContext

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) -> &RootContext

Implementors§