pub struct InternalExecutor { /* private fields */ }
Expand description
Executes internal functions using pre-compiled logic for optimal performance.
The InternalExecutor
provides:
- Efficient execution of map transformations using compiled logic
- Fast validation rule evaluation with detailed error reporting
- Condition evaluation for workflow and task control flow
- Thread-safe operation via Arc-wrapped compiled logic
Implementations§
Source§impl InternalExecutor
impl InternalExecutor
Sourcepub fn new(
datalogic: Arc<DataLogic>,
logic_cache: Vec<Arc<CompiledLogic>>,
) -> Self
pub fn new( datalogic: Arc<DataLogic>, logic_cache: Vec<Arc<CompiledLogic>>, ) -> Self
Create a new InternalExecutor with DataLogic v4
Sourcepub fn logic_cache(&self) -> &Vec<Arc<CompiledLogic>>
pub fn logic_cache(&self) -> &Vec<Arc<CompiledLogic>>
Get a reference to the logic cache
Sourcepub fn execute_map(
&self,
message: &mut Message,
config: &MapConfig,
) -> Result<(usize, Vec<Change>)>
pub fn execute_map( &self, message: &mut Message, config: &MapConfig, ) -> Result<(usize, Vec<Change>)>
Execute the internal map function with optimized data handling
Sourcepub fn execute_validation(
&self,
message: &mut Message,
config: &ValidationConfig,
) -> Result<(usize, Vec<Change>)>
pub fn execute_validation( &self, message: &mut Message, config: &ValidationConfig, ) -> Result<(usize, Vec<Change>)>
Execute the internal validation function
Sourcepub fn evaluate_condition(
&self,
condition_index: Option<usize>,
context: Arc<Value>,
) -> Result<bool>
pub fn evaluate_condition( &self, condition_index: Option<usize>, context: Arc<Value>, ) -> Result<bool>
Evaluate a condition using cached compiled logic The context passed here contains data, metadata, temp_data, and payload Conditions can now access any field: metadata.field, data.field, temp_data.field
Auto Trait Implementations§
impl Freeze for InternalExecutor
impl !RefUnwindSafe for InternalExecutor
impl Send for InternalExecutor
impl Sync for InternalExecutor
impl Unpin for InternalExecutor
impl !UnwindSafe for InternalExecutor
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