use serde::de::DeserializeOwned;
use serde::Serialize;
pub trait DynConfigurationKey {
type Value: DeserializeOwned + Serialize;
fn path(&self) -> &'static str;
}
#[macro_export]
macro_rules! configuration_keys {
($($key_ident:ident($key:literal, $value:ident)),* ) => {
$(
pub struct $key_ident;
impl $crate::dyn_configuration::DynConfigurationKey for $key_ident {
type Value = $value;
fn path(&self) -> &'static str {
$key
}
}
)*
};
}