AdvancedAgenda

Struct AdvancedAgenda 

Source
pub struct AdvancedAgenda { /* private fields */ }
Expand description

Advanced Agenda (Drools-style)

Implementations§

Source§

impl AdvancedAgenda

Source

pub fn new() -> Self

Create a new agenda with “MAIN” as default focus

Source

pub fn add_activation(&mut self, activation: Activation)

Add an activation to the agenda

Source

pub fn get_next_activation(&mut self) -> Option<Activation>

Get the next activation to fire (from current focus)

Source

pub fn mark_rule_fired(&mut self, activation: &Activation)

Mark a rule as fired

Source

pub fn set_focus(&mut self, group: String)

Set focus to a specific agenda group

Source

pub fn get_focus(&self) -> &str

Get current focus

Source

pub fn clear(&mut self)

Clear all agenda groups

Source

pub fn reset_fired_flags(&mut self)

Reset fired flags (for re-evaluation)

Source

pub fn activate_ruleflow_group(&mut self, group: String)

Activate a ruleflow group (make rules in this group eligible to fire)

Source

pub fn deactivate_ruleflow_group(&mut self, group: &str)

Deactivate a ruleflow group

Source

pub fn is_ruleflow_group_active(&self, group: &str) -> bool

Check if ruleflow group is active

Source

pub fn stats(&self) -> AgendaStats

Get agenda statistics

Trait Implementations§

Source§

impl Default for AdvancedAgenda

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.