pub trait LangExtractor {
type Presets: Default;
const LANG_TAG: &'static str;
const ALLOWED_KINDS: &'static [&'static str];
const KIND_SPECS: &'static [KindSpec];
const ALLOWED_VISIBILITIES: &'static [&'static str];
// Required methods
fn parse(uri: &str, source: &str) -> ParsedDocument;
fn extract_parsed(
context: ExtractionContext<'_, Self::Presets>,
document: &ParsedDocument,
) -> CodeGraph;
// Provided methods
fn file_root(_uri: &str, _anchor: &Moniker) -> Option<Moniker> { ... }
fn extract(
uri: &str,
source: &str,
anchor: &Moniker,
deep: bool,
presets: &Self::Presets,
) -> CodeGraph { ... }
}Required Associated Constants§
const LANG_TAG: &'static str
const ALLOWED_KINDS: &'static [&'static str]
const KIND_SPECS: &'static [KindSpec]
const ALLOWED_VISIBILITIES: &'static [&'static str]
Required Associated Types§
Required Methods§
fn parse(uri: &str, source: &str) -> ParsedDocument
fn extract_parsed( context: ExtractionContext<'_, Self::Presets>, document: &ParsedDocument, ) -> CodeGraph
Provided Methods§
fn file_root(_uri: &str, _anchor: &Moniker) -> Option<Moniker>
fn extract( uri: &str, source: &str, anchor: &Moniker, deep: bool, presets: &Self::Presets, ) -> CodeGraph
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".