pub struct LanguageHandlerImpl<L> { /* private fields */ }Expand description
A language handler implementation that wraps a LanguageTraitImpl.
Implementations§
Source§impl<L> LanguageHandlerImpl<L>where
L: LanguageTraitImpl,
impl<L> LanguageHandlerImpl<L>where
L: LanguageTraitImpl,
Trait Implementations§
Source§impl<L> LanguageHandler for LanguageHandlerImpl<L>
impl<L> LanguageHandler for LanguageHandlerImpl<L>
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Get the unique name of this language (e.g., “rust”, “typescript”)
Source§fn extensions(&self) -> &'static [&'static str]
fn extensions(&self) -> &'static [&'static str]
Get supported file extensions for this language
Source§fn manifest_name(&self) -> &'static str
fn manifest_name(&self) -> &'static str
Get the manifest file name (e.g., “Cargo.toml”, “package.json”)
Source§fn parse(&self, text: &[u8]) -> Option<Box<dyn ParseTree>>
fn parse(&self, text: &[u8]) -> Option<Box<dyn ParseTree>>
Parse source code and return a generic parse tree
Source§fn supports_extension(&self, ext: &str) -> bool
fn supports_extension(&self, ext: &str) -> bool
Check if a file extension is supported by this language
Auto Trait Implementations§
impl<L> Freeze for LanguageHandlerImpl<L>
impl<L> RefUnwindSafe for LanguageHandlerImpl<L>where
L: RefUnwindSafe,
impl<L> Send for LanguageHandlerImpl<L>where
L: Send,
impl<L> Sync for LanguageHandlerImpl<L>where
L: Sync,
impl<L> Unpin for LanguageHandlerImpl<L>where
L: Unpin,
impl<L> UnwindSafe for LanguageHandlerImpl<L>where
L: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more