Skip to main content

Frontend

Trait Frontend 

Source
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§

Source

fn name(&self) -> &str

The front-end’s name, which is also its asbuilt.toml table (rust reads [rust]).

Source

fn detect(&self, root: &Path) -> bool

Whether root is a code base this front-end reads, decided from marker files (Cargo.toml, package.json, …).

Source

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".

Implementors§