pub struct Program { /* private fields */ }Expand description
Compiled expression program
This is the executable form of an expression. It’s designed to be:
- Cheap to clone (uses Arc internally for large data)
- Fast to execute (linear operation sequence)
- Self-contained (no external lookups needed)
Implementations§
Source§impl Program
impl Program
Sourcepub fn try_new(ops: Vec<Op>) -> Result<Self>
pub fn try_new(ops: Vec<Op>) -> Result<Self>
Validate and create a program from a public bytecode sequence.
Sourcepub fn try_new_unoptimized(ops: Vec<Op>) -> Result<Self>
pub fn try_new_unoptimized(ops: Vec<Op>) -> Result<Self>
Validate and create an unoptimized program.
Sourcepub fn always_true() -> Self
pub fn always_true() -> Self
Create a program that returns true
Sourcepub fn always_false() -> Self
pub fn always_false() -> Self
Create a program that returns false
Sourcepub fn max_stack_depth(&self) -> usize
pub fn max_stack_depth(&self) -> usize
Get the maximum stack depth needed
Sourcepub fn needs_outer_context(&self) -> bool
pub fn needs_outer_context(&self) -> bool
Check if this program needs outer row context
Sourcepub fn needs_second_row(&self) -> bool
pub fn needs_second_row(&self) -> bool
Check if this program needs a second row (for joins)
Sourcepub fn with_source(self, source: String) -> Self
pub fn with_source(self, source: String) -> Self
Set source string for debugging
Sourcepub fn disassemble(&self) -> String
pub fn disassemble(&self) -> String
Disassemble the program for debugging
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Program
impl !UnwindSafe for Program
impl Freeze for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnsafeUnpin for Program
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