use serde::{Deserialize, Serialize};
use crate::fact::{Fact, ProposedFact};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
#[cfg_attr(feature = "strum", derive(strum::EnumIter))]
pub enum ContextKey {
Seeds,
Hypotheses,
Strategies,
Constraints,
Signals,
Competitors,
Evaluations,
Proposals,
Diagnostic,
}
pub trait Context: Send + Sync {
fn has(&self, key: ContextKey) -> bool;
fn get(&self, key: ContextKey) -> &[Fact];
fn get_proposals(&self, key: ContextKey) -> &[ProposedFact] {
let _ = key;
&[]
}
fn count(&self, key: ContextKey) -> usize {
self.get(key).len()
}
}