pub struct InMemoryLanguageContainer { /* private fields */ }Implementations§
Source§impl InMemoryLanguageContainer
impl InMemoryLanguageContainer
pub fn register_language(&mut self, lang: impl Into<Language>)
pub fn register_heuristic_rule(&mut self, rule: impl Into<HeuristicRule>)
Trait Implementations§
Source§impl Container for InMemoryLanguageContainer
impl Container for InMemoryLanguageContainer
Source§fn get_language_by_name(&self, name: &str) -> Option<&Language>
fn get_language_by_name(&self, name: &str) -> Option<&Language>
Returns a list of all
Language definitions identified by its name.Source§fn get_languages_by_extension(
&self,
file: impl AsRef<Path>,
) -> Option<Vec<&Language>>
fn get_languages_by_extension( &self, file: impl AsRef<Path>, ) -> Option<Vec<&Language>>
Returns a list of all
Language definitions identified by the extension of the given file.Source§fn get_languages_by_filename(
&self,
file: impl AsRef<Path>,
) -> Option<Vec<&Language>>
fn get_languages_by_filename( &self, file: impl AsRef<Path>, ) -> Option<Vec<&Language>>
Returns a list of all
Language definitions identified by the name of the given file.Source§fn get_heuristics_by_extension(
&self,
file: impl AsRef<Path>,
) -> Option<&Vec<HeuristicRule>>
fn get_heuristics_by_extension( &self, file: impl AsRef<Path>, ) -> Option<&Vec<HeuristicRule>>
Returns a list of all
HeuristicRule definitions identified by the extension of the given file.Source§impl Debug for InMemoryLanguageContainer
impl Debug for InMemoryLanguageContainer
Source§impl Default for InMemoryLanguageContainer
impl Default for InMemoryLanguageContainer
Source§fn default() -> InMemoryLanguageContainer
fn default() -> InMemoryLanguageContainer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InMemoryLanguageContainer
impl RefUnwindSafe for InMemoryLanguageContainer
impl Send for InMemoryLanguageContainer
impl Sync for InMemoryLanguageContainer
impl Unpin for InMemoryLanguageContainer
impl UnsafeUnpin for InMemoryLanguageContainer
impl UnwindSafe for InMemoryLanguageContainer
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