pub trait RuleRegistry:
Send
+ Sync
+ 'static {
// Required method
fn rules<'a>(
&'a self,
) -> Pin<Box<dyn Future<Output = Vec<Rule>> + Send + 'a>>;
// Provided methods
fn mark_injected(&self, _name: &str, _turn: u64) { ... }
fn injected_records(&self) -> Vec<(String, u64)> { ... }
fn restore(&self, _records: Vec<(String, u64)>) { ... }
}Expand description
Registry of TTSR rules (supplied by the host).
This is a simplified version of oxicode_sdk::ports::RuleRegistry that lives
in oxicode-agent to avoid a dependency cycle.
Required Methods§
Provided Methods§
Sourcefn mark_injected(&self, _name: &str, _turn: u64)
fn mark_injected(&self, _name: &str, _turn: u64)
Mark that a rule was injected at a given turn.
Sourcefn injected_records(&self) -> Vec<(String, u64)>
fn injected_records(&self) -> Vec<(String, u64)>
Return all injection records for compaction survival.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".