pub struct SyncContext { /* private fields */ }
Expand description
A recognition context that blocks the current thread until the engine recognizes a phrase.
Implementations§
Source§impl SyncContext
impl SyncContext
Methods from Deref<Target = 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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SyncContext
impl RefUnwindSafe for SyncContext
impl !Send for SyncContext
impl !Sync for SyncContext
impl Unpin for SyncContext
impl UnwindSafe for SyncContext
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