pub struct FactEngine { /* private fields */ }Expand description
The main FACT processing engine
Implementations§
Source§impl FactEngine
impl FactEngine
Sourcepub fn with_config(config: EngineConfig) -> Self
pub fn with_config(config: EngineConfig) -> Self
Create a new engine with custom configuration
Sourcepub async fn process(&self, template_id: &str, context: Value) -> Result<Value>
pub async fn process(&self, template_id: &str, context: Value) -> Result<Value>
Process a context using a cognitive template
Sourcepub async fn process_with_options(
&self,
template_id: &str,
context: Value,
options: ProcessingOptions,
) -> Result<Value>
pub async fn process_with_options( &self, template_id: &str, context: Value, options: ProcessingOptions, ) -> Result<Value>
Process with custom options
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FactEngine
impl !RefUnwindSafe for FactEngine
impl Send for FactEngine
impl Sync for FactEngine
impl Unpin for FactEngine
impl !UnwindSafe for FactEngine
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