pub struct ExprVM { /* private fields */ }Implementations§
Source§impl ExprVM
impl ExprVM
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new VM with default stack capacity Uses inline storage for up to 16 stack values and 8 args (no heap allocation)
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a VM with specific stack capacity If capacity > 16, will spill to heap when needed
Sourcepub fn execute(
&mut self,
program: &Program,
ctx: &ExecuteContext<'_>,
) -> Result<Value>
pub fn execute( &mut self, program: &Program, ctx: &ExecuteContext<'_>, ) -> Result<Value>
Execute a program and return the result
Sourcepub fn execute_cow<'a>(
&mut self,
program: &'a Program,
ctx: &'a ExecuteContext<'a>,
) -> Result<Value>
pub fn execute_cow<'a>( &mut self, program: &'a Program, ctx: &'a ExecuteContext<'a>, ) -> Result<Value>
Execute a program using borrowed values where possible (Cow-based stack)
This version avoids cloning values from the row when possible. Values are only cloned when they need to be modified or passed to functions.
Sourcepub fn execute_bool(
&mut self,
program: &Program,
ctx: &ExecuteContext<'_>,
) -> bool
pub fn execute_bool( &mut self, program: &Program, ctx: &ExecuteContext<'_>, ) -> bool
Execute and return boolean result (for WHERE clauses)
This method is optimized for common filter patterns, avoiding the full VM loop overhead for simple comparisons.
Sourcepub fn execute_bool_checked(
&mut self,
program: &Program,
ctx: &ExecuteContext<'_>,
) -> Result<bool>
pub fn execute_bool_checked( &mut self, program: &Program, ctx: &ExecuteContext<'_>, ) -> Result<bool>
Like execute_bool but returns errors instead of swallowing them.
Used by RowFilter::matches_checked to propagate VM errors (e.g. invalid REGEXP patterns) through the query result iterator.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExprVM
impl RefUnwindSafe for ExprVM
impl Send for ExprVM
impl Sync for ExprVM
impl Unpin for ExprVM
impl UnsafeUnpin for ExprVM
impl UnwindSafe for ExprVM
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
Source§impl<T> CompactArcDrop for T
impl<T> CompactArcDrop for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more