pub trait Linter: LSend {
// Required methods
fn lint(&mut self, document: &Document) -> Vec<Lint>;
fn description(&self) -> &str;
}Expand description
A stateless rule that searches documents for grammatical errors.
Commonly implemented via ExprLinter.
See also: LintGroup.
Required Methods§
Sourcefn lint(&mut self, document: &Document) -> Vec<Lint>
fn lint(&mut self, document: &Document) -> Vec<Lint>
Analyzes a document and produces zero or more Lints.
We pass self mutably for caching purposes.
Sourcefn description(&self) -> &str
fn description(&self) -> &str
A user-facing description of what kinds of grammatical errors this rule looks for. It is usually shown in settings menus.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".