spin_factors/
runtime_config.rs1pub mod toml;
2
3use crate::Factor;
4
5pub trait FactorRuntimeConfigSource<F: Factor> {
7 fn get_runtime_config(&mut self) -> anyhow::Result<Option<F::RuntimeConfig>>;
9}
10
11impl<F: Factor> FactorRuntimeConfigSource<F> for () {
12 fn get_runtime_config(&mut self) -> anyhow::Result<Option<<F as Factor>::RuntimeConfig>> {
13 Ok(None)
14 }
15}
16
17pub trait RuntimeConfigSourceFinalizer {
19 fn finalize(&mut self) -> anyhow::Result<()>;
21}
22
23impl RuntimeConfigSourceFinalizer for () {
24 fn finalize(&mut self) -> anyhow::Result<()> {
25 Ok(())
26 }
27}