pub trait LanguageRegistry {
// Required method
fn language_for_extension(&self, extension: &str) -> Option<&Language>;
}Expand description
Resolves a Language by file extension (no leading dot, e.g. "rs").
Intentionally minimal: no shebang detection, no content sniffing — see
Zed’s LanguageRegistry for that scope, out of bounds here.
Required Methods§
fn language_for_extension(&self, extension: &str) -> Option<&Language>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".