pub struct GrammarInfo {
pub name: &'static str,
pub language: Language,
pub repo_url: &'static str,
pub ts_func_symbol: &'static str,
pub extensions: &'static [&'static str],
pub src_dir: &'static str,
pub has_cpp_scanner: bool,
pub compatible_ref: Option<&'static str>,
}Expand description
Metadata for a known tree-sitter grammar.
Fields§
§name: &'static str§language: Language§repo_url: &'static str§ts_func_symbol: &'static str§extensions: &'static [&'static str]§src_dir: &'static str§has_cpp_scanner: bool§compatible_ref: Option<&'static str>Git ref (tag/commit) compatible with tree-sitter ABI 14 (tree-sitter 0.24).
Use None to clone HEAD (risky if the grammar moves to a newer ABI).
Auto Trait Implementations§
impl Freeze for GrammarInfo
impl RefUnwindSafe for GrammarInfo
impl Send for GrammarInfo
impl Sync for GrammarInfo
impl Unpin for GrammarInfo
impl UnsafeUnpin for GrammarInfo
impl UnwindSafe for GrammarInfo
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