Reasoner

Trait Reasoner 

Source
pub trait Reasoner: Send + Sync {
    // Required methods
    fn act(&mut self, context: &mut Context) -> Result<Trace>;
    fn policy(&self) -> &Policy;
    fn update_policy(&mut self, policy: Policy) -> Result<()>;
    fn name(&self) -> &'static str;
}
Expand description

Trait for objects that can reason about state and take actions

Required Methods§

Source

fn act(&mut self, context: &mut Context) -> Result<Trace>

Perform one reasoning step

Source

fn policy(&self) -> &Policy

Get current policy

Source

fn update_policy(&mut self, policy: Policy) -> Result<()>

Update policy

Source

fn name(&self) -> &'static str

Get reasoner type name

Implementors§