pub trait LangExtractor {
type Presets: Default;
const LANG_TAG: &'static str;
const ALLOWED_KINDS: &'static [&'static str];
const ALLOWED_VISIBILITIES: &'static [&'static str];
// Required method
fn extract(
uri: &str,
source: &str,
anchor: &Moniker,
deep: bool,
presets: &Self::Presets,
) -> CodeGraph;
// Provided methods
fn declare(spec: &Value) -> Result<CodeGraph, DeclareError> { ... }
fn to_spec(graph: &CodeGraph) -> Result<Value, SerializeError> { ... }
}Required Associated Constants§
const LANG_TAG: &'static str
const ALLOWED_KINDS: &'static [&'static str]
const ALLOWED_VISIBILITIES: &'static [&'static str]
Required Associated Types§
Required Methods§
fn extract( uri: &str, source: &str, anchor: &Moniker, deep: bool, presets: &Self::Presets, ) -> CodeGraph
Provided Methods§
fn declare(spec: &Value) -> Result<CodeGraph, DeclareError>
fn to_spec(graph: &CodeGraph) -> Result<Value, SerializeError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.