use super::config::Config;
use crate::script::Script;
use crate::stats::SharedStats;
use std::sync::Arc;
pub struct AppState {
pub config: Config,
pub stats: SharedStats,
pub script: Option<Arc<Script>>,
}
impl AppState {
pub fn new(config: Config, stats: SharedStats) -> Self {
Self {
config,
stats,
script: None,
}
}
pub fn with_script(mut self, script: Arc<Script>) -> Self {
self.script = Some(script);
self
}
}