pub trait Check {
// Required methods
fn id(&self) -> &'static str;
fn run(&self, ctx: &CheckCtx<'_>, out: &mut Vec<Finding>);
// Provided method
fn readiness(&self, _ctx: &CheckCtx<'_>) -> Readiness { ... }
}Expand description
A lint check that can inspect a document and emit structured
Finding values.
Custom embedders may implement this trait and pass their checks to
run_checks alongside, or instead of, all_checks. Implementors
should keep run panic-free for loader-valid documents; use
Check::readiness to describe missing rig roles or configuration
prerequisites.
Required Methods§
Provided Methods§
Sourcefn readiness(&self, _ctx: &CheckCtx<'_>) -> Readiness
fn readiness(&self, _ctx: &CheckCtx<'_>) -> Readiness
Whether the check’s prerequisites are met. The default is
Readiness::Ready — mechanical checks need no rig or config.
Role-dependent checks override this to declare their needs so
the runner, not the check, owns skip-note emission.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".