NanoAgent

Trait NanoAgent 

Source
pub trait NanoAgent: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn tick(&mut self, now_ns: u128, bus: &NanoBus) -> TickResult;
    fn budget_ns(&self) -> u128;

    // Provided method
    fn reflect(&mut self, _update: PolicyUpdate) { ... }
}
Expand description

Core trait for nano-agents

Required Methods§

Source

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

Agent name for tracing and debugging

Source

fn tick(&mut self, now_ns: u128, bus: &NanoBus) -> TickResult

Execute one tick within the given time budget

Source

fn budget_ns(&self) -> u128

Get the per-tick budget in nanoseconds

Provided Methods§

Source

fn reflect(&mut self, _update: PolicyUpdate)

Optional reflection callback for policy updates

Implementors§