pub struct LanguageRegistry;Implementations§
Source§impl LanguageRegistry
impl LanguageRegistry
pub fn get_language(name: &str) -> Option<&'static LanguageDefinition>
pub fn detect_by_extension( extension: &str, ) -> Option<&'static LanguageDefinition>
pub fn detect_by_filename(filename: &str) -> Option<&'static LanguageDefinition>
pub fn detect_by_path<P: AsRef<Path>>( path: P, ) -> Option<&'static LanguageDefinition>
pub fn all_languages() -> impl Iterator<Item = &'static LanguageDefinition>
pub fn languages_by_type( lang_type: LanguageType, ) -> impl Iterator<Item = &'static LanguageDefinition>
Auto Trait Implementations§
impl Freeze for LanguageRegistry
impl RefUnwindSafe for LanguageRegistry
impl Send for LanguageRegistry
impl Sync for LanguageRegistry
impl Unpin for LanguageRegistry
impl UnwindSafe for LanguageRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more