pub enum Instruction {
Show 18 variants
LoadConstant {
destination_register: u16,
constant_index: u16,
},
LoadData {
destination_register: u16,
data_index: u16,
},
LoadNow {
destination_register: u16,
},
Arithmetic {
destination_register: u16,
operation: ArithmeticComputation,
left_register: u16,
right_register: u16,
},
Comparison {
destination_register: u16,
operation: ComparisonComputation,
left_register: u16,
right_register: u16,
},
UnitConversion {
destination_register: u16,
source_register: u16,
target: SemanticConversionTarget,
},
Mathematical {
destination_register: u16,
operation: MathematicalComputation,
source_register: u16,
},
DateRelative {
destination_register: u16,
kind: DateRelativeKind,
source_register: u16,
},
DateCalendar {
destination_register: u16,
kind: DateCalendarKind,
unit: CalendarPeriodUnit,
source_register: u16,
},
RangeLiteral {
destination_register: u16,
left_register: u16,
right_register: u16,
},
PastFutureRange {
destination_register: u16,
kind: DateRelativeKind,
source_register: u16,
},
RangeContainment {
destination_register: u16,
value_register: u16,
range_register: u16,
},
ResultIsVeto {
destination_register: u16,
source_register: u16,
},
MoveRegister {
destination_register: u16,
source_register: u16,
},
UserVeto {
destination_register: u16,
message_index: u16,
},
JumpIfFalse {
condition_register: u16,
target_instruction: u32,
veto_semantics: JumpVetoSemantics,
},
Jump {
target_instruction: u32,
},
Return {
source_register: u16,
},
}Expand description
One compiled operation in a rule’s instruction stream.
Variants§
LoadConstant
LoadData
LoadNow
Arithmetic
Fields
§
operation: ArithmeticComputationComparison
Fields
§
operation: ComparisonComputationUnitConversion
Mathematical
DateRelative
DateCalendar
RangeLiteral
PastFutureRange
RangeContainment
ResultIsVeto
MoveRegister
UserVeto
JumpIfFalse
Jump
Return
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Instruction
impl Debug for Instruction
Source§impl<'de> Deserialize<'de> for Instruction
impl<'de> Deserialize<'de> for Instruction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Instruction
impl PartialEq for Instruction
Source§fn eq(&self, other: &Instruction) -> bool
fn eq(&self, other: &Instruction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for Instruction
impl Serialize for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnsafeUnpin for Instruction
impl UnwindSafe for Instruction
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