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§
Sourcefn from_path(path: &Path) -> Option<Language>
fn from_path(path: &Path) -> Option<Language>
The language a file extension (without its leading dot) implies, if any.
Sourcefn tree_sitter(self) -> Option<TreeSitterLanguage>
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".