pub struct Context { /* private fields */ }
Expand description
Provides the common API shared across different kinds of contexts.
Implementations§
Source§impl Context
impl Context
Sourcepub fn set_enabled(&self, enabled: bool) -> Result<()>
pub fn set_enabled(&self, enabled: bool) -> Result<()>
Enables or disables the recognition of rules from all grammars loaded into this context.
Sourcepub fn grammar_builder(&self) -> GrammarBuilder<'_>
pub fn grammar_builder(&self) -> GrammarBuilder<'_>
Creates a GrammarBuilder
that will construct and load a grammar into this context.
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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