Skip to main content

LangResolver

Trait LangResolver 

Source
pub trait LangResolver: Send + Sync {
    // Required methods
    fn language(&self) -> Language;
    fn member_kinds(&self) -> &'static [&'static str];
    fn call_kinds(&self) -> &'static [&'static str];
    fn import_kinds(&self) -> &'static [&'static str];

    // Provided method
    fn type_kinds(&self) -> &'static [&'static str] { ... }
}
Expand description

Per-language resolution rules. Most behavior is shared; this captures the few places grammars diverge.

Required Methods§

Source

fn language(&self) -> Language

Source

fn member_kinds(&self) -> &'static [&'static str]

Kinds that introduce a member access whose property identifier should be treated as a method/field (so a.b classifies b as a member).

Source

fn call_kinds(&self) -> &'static [&'static str]

Kinds that represent a call/invocation.

Source

fn import_kinds(&self) -> &'static [&'static str]

Kinds that represent an import/use statement.

Provided Methods§

Source

fn type_kinds(&self) -> &'static [&'static str]

Kinds that represent a type annotation / type reference position.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§