pub trait Tools {
// Required methods
fn check(&mut self) -> Result<String, String>;
fn rules(&mut self) -> Result<String, String>;
fn explain(&mut self, rule: &str) -> Result<String, String>;
}Expand description
What the host can ask lanekeep to do.
A trait rather than an engine, for the same reason the LSP loop takes a closure: this crate stays protocol-only, and its tests need no project on disk.
Required Methods§
Sourcefn check(&mut self) -> Result<String, String>
fn check(&mut self) -> Result<String, String>
Run the project’s rules and describe what they found.
§Errors
Returns the message to show the model when the run could not happen at all.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".