#[repr(u8)]pub enum OpCode {
Show 59 variants
Var = 0,
Val = 1,
Exists = 57,
Equals = 2,
StrictEquals = 3,
NotEquals = 4,
StrictNotEquals = 5,
GreaterThan = 6,
GreaterThanEqual = 7,
LessThan = 8,
LessThanEqual = 9,
Not = 10,
DoubleNot = 11,
And = 12,
Or = 13,
If = 14,
Ternary = 15,
Coalesce = 56,
Add = 16,
Subtract = 17,
Multiply = 18,
Divide = 19,
Modulo = 20,
Max = 21,
Min = 22,
Abs = 49,
Ceil = 50,
Floor = 51,
Cat = 23,
Substr = 24,
In = 25,
Length = 53,
StartsWith = 38,
EndsWith = 39,
Upper = 40,
Lower = 41,
Trim = 42,
Split = 43,
Merge = 26,
Filter = 27,
Map = 28,
Reduce = 29,
All = 30,
Some = 31,
None = 32,
Sort = 54,
Slice = 55,
Datetime = 44,
Timestamp = 45,
ParseDate = 46,
FormatDate = 47,
DateDiff = 48,
Now = 58,
Try = 35,
Throw = 36,
Type = 37,
Missing = 33,
MissingSome = 34,
Preserve = 52,
}Expand description
OpCode enum for fast built-in operator lookup
Variants§
Var = 0
Val = 1
Exists = 57
Equals = 2
StrictEquals = 3
NotEquals = 4
StrictNotEquals = 5
GreaterThan = 6
GreaterThanEqual = 7
LessThan = 8
LessThanEqual = 9
Not = 10
DoubleNot = 11
And = 12
Or = 13
If = 14
Ternary = 15
Coalesce = 56
Add = 16
Subtract = 17
Multiply = 18
Divide = 19
Modulo = 20
Max = 21
Min = 22
Abs = 49
Ceil = 50
Floor = 51
Cat = 23
Substr = 24
In = 25
Length = 53
StartsWith = 38
EndsWith = 39
Upper = 40
Lower = 41
Trim = 42
Split = 43
Merge = 26
Filter = 27
Map = 28
Reduce = 29
All = 30
Some = 31
None = 32
Sort = 54
Slice = 55
Datetime = 44
Timestamp = 45
ParseDate = 46
FormatDate = 47
DateDiff = 48
Now = 58
Try = 35
Throw = 36
Type = 37
Missing = 33
MissingSome = 34
Preserve = 52
Implementations§
Source§impl OpCode
impl OpCode
Sourcepub fn evaluate_direct(
&self,
args: &[CompiledNode],
context: &mut ContextStack,
engine: &DataLogic,
) -> Result<Value>
pub fn evaluate_direct( &self, args: &[CompiledNode], context: &mut ContextStack, engine: &DataLogic, ) -> Result<Value>
Direct evaluation method - no boxing, no vtables, no array lookups
Sourcepub fn evaluate_traced(
&self,
args: &[CompiledNode],
context: &mut ContextStack,
engine: &DataLogic,
collector: &mut TraceCollector,
node_id_map: &HashMap<usize, u32>,
) -> Result<Value>
pub fn evaluate_traced( &self, args: &[CompiledNode], context: &mut ContextStack, engine: &DataLogic, collector: &mut TraceCollector, node_id_map: &HashMap<usize, u32>, ) -> Result<Value>
Traced evaluation method - records steps for debugging.
This method dispatches to traced versions of operators that need special handling (iteration and short-circuit operators), while regular operators use the standard evaluation with child tracing.
Trait Implementations§
impl Copy for OpCode
impl Eq for OpCode
impl StructuralPartialEq for OpCode
Auto Trait Implementations§
impl Freeze for OpCode
impl RefUnwindSafe for OpCode
impl Send for OpCode
impl Sync for OpCode
impl Unpin for OpCode
impl UnwindSafe for OpCode
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