Skip to main content

Decider

Trait Decider 

Source
pub trait Decider:
    Send
    + Sync
    + Debug {
    // Required methods
    fn decide(&self, context: &DecisionContext, state: &AgentState) -> Action;
    fn name(&self) -> &'static str;
}
Expand description

Trait for decision-making strategies

A Decider takes the current context and state, and returns the next Action.

Required Methods§

Source

fn decide(&self, context: &DecisionContext, state: &AgentState) -> Action

Decide the next action based on context and state

Source

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

Name of this decider (for logging)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§