Skip to main content

LangExtractor

Trait LangExtractor 

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

Source

const LANG_TAG: &'static str

Source

const ALLOWED_KINDS: &'static [&'static str]

Source

const ALLOWED_VISIBILITIES: &'static [&'static str]

Required Associated Types§

Required Methods§

Source

fn extract( uri: &str, source: &str, anchor: &Moniker, deep: bool, presets: &Self::Presets, ) -> CodeGraph

Provided Methods§

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.

Implementors§

Source§

impl LangExtractor for code_moniker_core::lang::cs::Lang

Source§

const LANG_TAG: &'static str = "cs"

Source§

const ALLOWED_KINDS: &'static [&'static str]

Source§

const ALLOWED_VISIBILITIES: &'static [&'static str]

Source§

type Presets = Presets

Source§

impl LangExtractor for code_moniker_core::lang::go::Lang

Source§

const LANG_TAG: &'static str = "go"

Source§

const ALLOWED_KINDS: &'static [&'static str]

Source§

const ALLOWED_VISIBILITIES: &'static [&'static str]

Source§

type Presets = Presets

Source§

impl LangExtractor for code_moniker_core::lang::java::Lang

Source§

const LANG_TAG: &'static str = "java"

Source§

const ALLOWED_KINDS: &'static [&'static str]

Source§

const ALLOWED_VISIBILITIES: &'static [&'static str]

Source§

type Presets = Presets

Source§

impl LangExtractor for code_moniker_core::lang::python::Lang

Source§

const LANG_TAG: &'static str = "python"

Source§

const ALLOWED_KINDS: &'static [&'static str]

Source§

const ALLOWED_VISIBILITIES: &'static [&'static str]

Source§

type Presets = Presets

Source§

impl LangExtractor for code_moniker_core::lang::rs::Lang

Source§

const LANG_TAG: &'static str = "rs"

Source§

const ALLOWED_KINDS: &'static [&'static str]

Source§

const ALLOWED_VISIBILITIES: &'static [&'static str]

Source§

type Presets = Presets

Source§

impl LangExtractor for code_moniker_core::lang::sql::Lang

Source§

const LANG_TAG: &'static str = "sql"

Source§

const ALLOWED_KINDS: &'static [&'static str]

Source§

const ALLOWED_VISIBILITIES: &'static [&'static str]

Source§

type Presets = Presets

Source§

impl LangExtractor for code_moniker_core::lang::ts::Lang

Source§

const LANG_TAG: &'static str = "ts"

Source§

const ALLOWED_KINDS: &'static [&'static str]

Source§

const ALLOWED_VISIBILITIES: &'static [&'static str]

Source§

type Presets = Presets