pub struct LogicCompiler { /* private fields */ }Expand description
Compiles JSONLogic expressions and stamps them onto workflow/task/config
structs as Option<Arc<Logic>> slots.
Implementations§
Source§impl LogicCompiler
impl LogicCompiler
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new LogicCompiler with a fresh datalogic Engine configured for
templating mode (preserves object structure in JSONLogic operations).
Sourcepub fn into_engine(self) -> Arc<Engine>
pub fn into_engine(self) -> Arc<Engine>
Consume the compiler and return the shared engine.
Sourcepub fn compile_workflows(
&self,
workflows: Vec<Workflow>,
) -> Result<Vec<Workflow>>
pub fn compile_workflows( &self, workflows: Vec<Workflow>, ) -> Result<Vec<Workflow>>
Compile all workflows and their tasks, returning them sorted by priority.
Returns Err on the first validation or compilation failure — engine
construction is fail-loud so misconfigured workflows can’t silently
disappear at runtime.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for LogicCompiler
impl !UnwindSafe for LogicCompiler
impl Freeze for LogicCompiler
impl Send for LogicCompiler
impl Sync for LogicCompiler
impl Unpin for LogicCompiler
impl UnsafeUnpin 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