pub trait ConfigStore:
Send
+ Sync
+ 'static {
// Required methods
fn get(&self, key: &str) -> Result<Option<PortValue>, SdkError>;
fn set(&self, key: &str, value: PortValue) -> Result<(), SdkError>;
fn list(&self) -> Result<Vec<(String, PortValue)>, SdkError>;
// Provided method
fn source(&self, _key: &str) -> Option<String> { ... }
}Expand description
Layered configuration source (defaults → global → project → env → CLI).
Synchronous because configuration should always be readable without I/O once the product is initialized.
§Use cases
- Read
~/.oxicode/settings.tomlor~/.oxios/config.toml - Merge per-project overrides
- Apply environment variable fallbacks
Required Methods§
Sourcefn get(&self, key: &str) -> Result<Option<PortValue>, SdkError>
fn get(&self, key: &str) -> Result<Option<PortValue>, SdkError>
Get a value by dotted key (e.g. "model.provider").
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".