Skip to main content

LanguageInfo

Trait LanguageInfo 

Source
pub trait LanguageInfo {
    type BaseLang;

    // Required methods
    fn get_lang() -> LANG;
    fn get_lang_name() -> &'static str;
}
Expand description

Static identification of a language code tag.

Implemented by every XxxCode type generated by the internal mk_code! macro.

Required Associated Types§

Source

type BaseLang

Tree-sitter base language enum carried by this code tag.

Required Methods§

Source

fn get_lang() -> LANG

Returns the workspace-level LANG variant for this code tag.

Source

fn get_lang_name() -> &'static str

Returns the human-readable language name for this code tag.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§