rskit_config/source/contract.rs
1use std::fmt;
2
3use rskit_errors::AppResult;
4
5/// Adapter contract for configuration sources.
6///
7/// Implement this trait in opt-in backend crates such as a future Vault, Parameter Store,
8/// or remote-config adapter. `rskit-config` owns ordering, decoding, defaults, and validation;
9/// adapters only return collected values.
10pub trait ConfigSource: fmt::Debug + Send + Sync + 'static {
11 /// Collect this source into a `config` source object.
12 fn collect(&self) -> AppResult<config::Config>;
13}