prefer_db
Database source for the prefer configuration library.
This crate provides a DbSource that implements prefer::Source, allowing configuration to be loaded from a database and layered with other prefer sources.
Usage
Add to your Cargo.toml:
[]
= "0.3"
= "0.3"
= "0.1"
Implement the ConfigLoader trait for your database:
use ;
use async_trait;
Use with prefer's ConfigBuilder:
use Config;
use DbSource;
async
Supported Formats
Configuration data can be stored in any of these formats:
- JSON
- TOML
- YAML
The format is determined by the format field in ConfigEntry.
License
MIT