pub trait StaticAnalyzer {
// Required methods
fn command(self) -> String;
fn analyze(
&self,
id: String,
content: String,
output: Option<String>,
) -> usize;
fn download(self, config: Option<ValeConfig>) -> Self;
fn download_checksums(self) -> Result<HashMap<String, String>, String>;
fn extract(self, path: PathBuf, destination: Option<PathBuf>) -> PathBuf;
fn sync(self) -> Result<(), Error>;
fn with_binary(self, path: PathBuf) -> Self;
fn with_config(self, value: ValeConfig) -> Self;
fn with_system_command(self) -> Self;
fn with_version(self, value: String) -> Self;
}
Expand description
Trait for static analyzers (e.g. Vale)
Required Methods§
Sourcefn analyze(&self, id: String, content: String, output: Option<String>) -> usize
fn analyze(&self, id: String, content: String, output: Option<String>) -> usize
Analyze content
Sourcefn download(self, config: Option<ValeConfig>) -> Self
fn download(self, config: Option<ValeConfig>) -> Self
Download binary
Sourcefn download_checksums(self) -> Result<HashMap<String, String>, String>
fn download_checksums(self) -> Result<HashMap<String, String>, String>
Download checksum values
Sourcefn with_binary(self, path: PathBuf) -> Self
fn with_binary(self, path: PathBuf) -> Self
Set binary
Sourcefn with_config(self, value: ValeConfig) -> Self
fn with_config(self, value: ValeConfig) -> Self
Set config
Sourcefn with_system_command(self) -> Self
fn with_system_command(self) -> Self
Set system command
Sourcefn with_version(self, value: String) -> Self
fn with_version(self, value: String) -> Self
Set version
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.