pub struct LogicCompiler { /* private fields */ }
Expand description
Compiles and caches JSONLogic expressions for optimal runtime performance.
The LogicCompiler
is responsible for:
- Pre-compiling all workflow conditions
- Pre-compiling task-specific logic (map transformations, validation rules)
- Maintaining a cache of compiled logic for efficient runtime evaluation
- Providing early validation of logic expressions
This separation of compilation from execution ensures that all expensive parsing and compilation work is done once at startup, not during message processing.
Implementations§
Source§impl LogicCompiler
impl LogicCompiler
Sourcepub fn logic_cache(&self) -> &Vec<Logic<'static>>
pub fn logic_cache(&self) -> &Vec<Logic<'static>>
Get the logic cache
Sourcepub fn into_parts(self) -> (DataLogic<'static>, Vec<Logic<'static>>)
pub fn into_parts(self) -> (DataLogic<'static>, Vec<Logic<'static>>)
Consume the compiler and return its components
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LogicCompiler
impl !RefUnwindSafe for LogicCompiler
impl !Send for LogicCompiler
impl !Sync for LogicCompiler
impl Unpin for LogicCompiler
impl !UnwindSafe for LogicCompiler
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more