pub struct HeuristicEngine {
pub rules: Vec<HeuristicRule>,
}Expand description
Heuristic engine — evaluates rules against semantic properties.
Fields§
§rules: Vec<HeuristicRule>Implementations§
Source§impl HeuristicEngine
impl HeuristicEngine
pub fn new() -> Self
Sourcepub fn with_builtins() -> Self
pub fn with_builtins() -> Self
Load built-in heuristic rules.
Sourcepub fn evaluate_by_names(
&self,
trait_tags: &[&str],
signal_tags: &[&str],
receiver_tags: &[&str],
props: &[(String, f32)],
) -> Vec<HeuristicResult>
pub fn evaluate_by_names( &self, trait_tags: &[&str], signal_tags: &[&str], receiver_tags: &[&str], props: &[(String, f32)], ) -> Vec<HeuristicResult>
Evaluate all rules against given tags. Returns matching rule results.
Trait Implementations§
Source§impl Clone for HeuristicEngine
impl Clone for HeuristicEngine
Source§fn clone(&self) -> HeuristicEngine
fn clone(&self) -> HeuristicEngine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HeuristicEngine
impl Debug for HeuristicEngine
Source§impl Default for HeuristicEngine
impl Default for HeuristicEngine
Source§fn default() -> HeuristicEngine
fn default() -> HeuristicEngine
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HeuristicEngine
impl RefUnwindSafe for HeuristicEngine
impl Send for HeuristicEngine
impl Sync for HeuristicEngine
impl Unpin for HeuristicEngine
impl UnsafeUnpin for HeuristicEngine
impl UnwindSafe for HeuristicEngine
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