pub struct LanguageConfig { /* private fields */ }Implementations§
Source§impl LanguageConfig
impl LanguageConfig
pub fn language(&self) -> &Language
pub fn classify(&self, kind: &str) -> NodeRole
Sourcepub fn is_test_context(
&self,
parser: &mut dyn AstParser,
path: &Path,
content: &str,
start_line: usize,
end_line: usize,
) -> bool
pub fn is_test_context( &self, parser: &mut dyn AstParser, path: &Path, content: &str, start_line: usize, end_line: usize, ) -> bool
Returns true if the given line range is inside test code.
Detection is language-specific: some languages need to parse the source, others rely on file path conventions alone.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LanguageConfig
impl RefUnwindSafe for LanguageConfig
impl Send for LanguageConfig
impl Sync for LanguageConfig
impl Unpin for LanguageConfig
impl UnsafeUnpin for LanguageConfig
impl UnwindSafe for LanguageConfig
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