pub struct Grammar { /* private fields */ }Implementations§
Source§impl Grammar
impl Grammar
Sourcepub unsafe fn new(name: &str, library_path: &Path) -> Result<Grammar, Error>
pub unsafe fn new(name: &str, library_path: &Path) -> Result<Grammar, Error>
Loads a shared library containing a tree sitter grammar with name name
§Safety
library_path must be a valid tree sitter grammar
pub fn abi_version(self) -> u32
pub fn node_kind_is_visible(self, kind_id: u16) -> bool
Trait Implementations§
impl Copy for Grammar
impl Eq for Grammar
impl Send for Grammar
impl StructuralPartialEq for Grammar
impl Sync for Grammar
Auto Trait Implementations§
impl Freeze for Grammar
impl RefUnwindSafe for Grammar
impl Unpin for Grammar
impl UnsafeUnpin for Grammar
impl UnwindSafe for Grammar
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