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§
Sourcefn tick(&mut self, now_ns: u128, bus: &NanoBus) -> TickResult
fn tick(&mut self, now_ns: u128, bus: &NanoBus) -> TickResult
Execute one tick within the given time budget
Provided Methods§
Sourcefn reflect(&mut self, _update: PolicyUpdate)
fn reflect(&mut self, _update: PolicyUpdate)
Optional reflection callback for policy updates