Skip to main content

ImportExtractor

Trait ImportExtractor 

Source
pub trait ImportExtractor {
    // Required method
    fn extract(&self, src: &str, lang: Language) -> Vec<String>;
}
Expand description

Pluggable source for “what file-edge specifiers does this source contain”. Implemented by RegexImportExtractor (the default) and, in the CLI binary, by a wrapper around aatxe_ast::describe(...).

The returned strings live in the same shape as extract_specifiers (e.g. ./foo, ./alt/d.rs, ./shared); resolve_import is what turns each into one or more on-disk paths and is shared across both implementations.

Required Methods§

Source

fn extract(&self, src: &str, lang: Language) -> Vec<String>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§