Skip to main content

LanguageExt

Trait LanguageExt 

Source
pub trait LanguageExt {
    // Required methods
    fn from_path(path: &Path) -> Option<Language>;
    fn tree_sitter(self) -> Option<TreeSitterLanguage>;
}
Expand description

Shell-side operations on the domain Language enum: path detection and the tree-sitter grammar bindings domain cannot depend on (it is no_std).

Required Methods§

Source

fn from_path(path: &Path) -> Option<Language>

The language a file extension (without its leading dot) implies, if any.

Source

fn tree_sitter(self) -> Option<TreeSitterLanguage>

This language’s tree-sitter grammar, or None when none is wired up yet.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§