pub struct Vm { /* private fields */ }
Expand description
A virtual machine-like construct that runs an AST on-the-fly
Implementations
sourceimpl Vm
impl Vm
sourcepub fn new(rules: Vec<OptimizedRule>) -> Vm
pub fn new(rules: Vec<OptimizedRule>) -> Vm
Creates a new Vm
from optimized rules
sourcepub fn new_with_listener(
rules: Vec<OptimizedRule>,
listener: Box<dyn Fn(String, &Position<'_>) -> bool + Sync + Send + RefUnwindSafe + UnwindSafe>
) -> Vm
pub fn new_with_listener(
rules: Vec<OptimizedRule>,
listener: Box<dyn Fn(String, &Position<'_>) -> bool + Sync + Send + RefUnwindSafe + UnwindSafe>
) -> Vm
Creates a new Vm
from optimized rules
and a listener function that is called when a rule is matched.
(used by the pest_debugger
crate)
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more