pub trait Frontend {
// Required methods
fn name(&self) -> &str;
fn detect(&self, root: &Path) -> bool;
fn analyze(&self, root: &Path, config: &Config) -> Result<Model>;
}Expand description
One language’s reader. asbuilt-rust is the first.
Required Methods§
Sourcefn name(&self) -> &str
fn name(&self) -> &str
The front-end’s name, which is also its asbuilt.toml table
(rust reads [rust]).
Sourcefn detect(&self, root: &Path) -> bool
fn detect(&self, root: &Path) -> bool
Whether root is a code base this front-end reads, decided from
marker files (Cargo.toml, package.json, …).
fn analyze(&self, root: &Path, config: &Config) -> Result<Model>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".