pub trait LanguagePlugin {
// Required methods
fn language(&self) -> &'static str;
fn extensions(&self) -> &[&str];
fn extract(&self, file: &str, source: &str) -> Vec<Symbol>;
}Expand description
Extracts definitions from a single source file.
Required Methods§
Sourcefn language(&self) -> &'static str
fn language(&self) -> &'static str
The language tag emitted on every Symbol (e.g. "ruby"). Also the
canonical name --lang matches against.
Sourcefn extensions(&self) -> &[&str]
fn extensions(&self) -> &[&str]
File extensions this plugin handles, without the dot (e.g. ["rb"]).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".