OpCode

Enum OpCode 

Source
pub enum OpCode {
Show 31 variants LoadEventField { path: FieldPath, dest: Register, default: Option<Value>, }, LoadConstant { value: Value, dest: Register, }, CopyRegister { source: Register, dest: Register, }, CopyRegisterIfNull { source: Register, dest: Register, }, GetEventType { dest: Register, }, CreateObject { dest: Register, }, SetField { object: Register, path: String, value: Register, }, SetFields { object: Register, fields: Vec<(String, Register)>, }, GetField { object: Register, path: String, dest: Register, }, ReadOrInitState { state_id: u32, key: Register, default: Value, dest: Register, }, UpdateState { state_id: u32, key: Register, value: Register, }, AppendToArray { object: Register, path: String, value: Register, }, GetCurrentTimestamp { dest: Register, }, CreateEvent { dest: Register, event_value: Register, }, CreateCapture { dest: Register, capture_value: Register, }, Transform { source: Register, dest: Register, transformation: Transformation, }, EmitMutation { entity_name: String, key: Register, state: Register, }, SetFieldIfNull { object: Register, path: String, value: Register, }, SetFieldMax { object: Register, path: String, value: Register, }, UpdateTemporalIndex { state_id: u32, index_name: String, lookup_value: Register, primary_key: Register, timestamp: Register, }, LookupTemporalIndex { state_id: u32, index_name: String, lookup_value: Register, timestamp: Register, dest: Register, }, UpdateLookupIndex { state_id: u32, index_name: String, lookup_value: Register, primary_key: Register, }, LookupIndex { state_id: u32, index_name: String, lookup_value: Register, dest: Register, }, SetFieldSum { object: Register, path: String, value: Register, }, SetFieldIncrement { object: Register, path: String, }, SetFieldMin { object: Register, path: String, value: Register, }, AddToUniqueSet { state_id: u32, set_name: String, value: Register, count_object: Register, count_path: String, }, ConditionalSetField { object: Register, path: String, value: Register, condition_field: FieldPath, condition_op: ComparisonOp, condition_value: Value, }, ConditionalIncrement { object: Register, path: String, condition_field: FieldPath, condition_op: ComparisonOp, condition_value: Value, }, EvaluateComputedFields { state: Register, computed_paths: Vec<String>, }, UpdatePdaReverseLookup { state_id: u32, lookup_name: String, pda_address: Register, primary_key: Register, },
}

Variants§

§

LoadEventField

Fields

§default: Option<Value>
§

LoadConstant

Fields

§value: Value
§

CopyRegister

Fields

§source: Register
§

CopyRegisterIfNull

Copy from source to dest only if dest is currently null

Fields

§source: Register
§

GetEventType

Fields

§

CreateObject

Fields

§

SetField

Fields

§object: Register
§path: String
§value: Register
§

SetFields

Fields

§object: Register
§fields: Vec<(String, Register)>
§

GetField

Fields

§object: Register
§path: String
§

ReadOrInitState

Fields

§state_id: u32
§default: Value
§

UpdateState

Fields

§state_id: u32
§value: Register
§

AppendToArray

Fields

§object: Register
§path: String
§value: Register
§

GetCurrentTimestamp

Fields

§

CreateEvent

Fields

§event_value: Register
§

CreateCapture

Fields

§capture_value: Register
§

Transform

Fields

§source: Register
§transformation: Transformation
§

EmitMutation

Fields

§entity_name: String
§state: Register
§

SetFieldIfNull

Fields

§object: Register
§path: String
§value: Register
§

SetFieldMax

Fields

§object: Register
§path: String
§value: Register
§

UpdateTemporalIndex

Fields

§state_id: u32
§index_name: String
§lookup_value: Register
§primary_key: Register
§timestamp: Register
§

LookupTemporalIndex

Fields

§state_id: u32
§index_name: String
§lookup_value: Register
§timestamp: Register
§

UpdateLookupIndex

Fields

§state_id: u32
§index_name: String
§lookup_value: Register
§primary_key: Register
§

LookupIndex

Fields

§state_id: u32
§index_name: String
§lookup_value: Register
§

SetFieldSum

Sum a numeric value to a field (accumulator)

Fields

§object: Register
§path: String
§value: Register
§

SetFieldIncrement

Increment a counter field by 1

Fields

§object: Register
§path: String
§

SetFieldMin

Set field to minimum value

Fields

§object: Register
§path: String
§value: Register
§

AddToUniqueSet

Add value to unique set and update count Maintains internal Set, field stores count

Fields

§state_id: u32
§set_name: String
§value: Register
§count_object: Register
§count_path: String
§

ConditionalSetField

Conditionally set a field based on a comparison

Fields

§object: Register
§path: String
§value: Register
§condition_field: FieldPath
§condition_op: ComparisonOp
§condition_value: Value
§

ConditionalIncrement

Conditionally increment a field based on a comparison

Fields

§object: Register
§path: String
§condition_field: FieldPath
§condition_op: ComparisonOp
§condition_value: Value
§

EvaluateComputedFields

Evaluate computed fields (calls external hook if provided) computed_paths: List of paths that will be computed (for dirty tracking)

Fields

§state: Register
§computed_paths: Vec<String>
§

UpdatePdaReverseLookup

Update PDA reverse lookup table Maps a PDA address to its primary key for reverse lookups

Fields

§state_id: u32
§lookup_name: String
§pda_address: Register
§primary_key: Register

Trait Implementations§

Source§

impl Clone for OpCode

Source§

fn clone(&self) -> OpCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OpCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more