pub struct Vm { /* private fields */ }
Expand description
A virtual machine-like construct that runs an AST on-the-fly
Implementations§
source§impl 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§
impl RefUnwindSafe for Vm
impl Send for Vm
impl Sync for Vm
impl Unpin for Vm
impl UnwindSafe for Vm
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