#[cfg(feature = "clap")]
#[macro_export]
#[doc(hidden)]
macro_rules! __clap_methods {
() => {
pub fn bind_clap(
matches: &$crate::__private::clap::ArgMatches,
bindings: &[(&str, &str)],
) -> ::core::result::Result<(), $crate::Error> {
Self::dynamic_config_flags().bind_clap(matches, bindings)
}
};
}
#[cfg(not(feature = "clap"))]
#[macro_export]
#[doc(hidden)]
macro_rules! __clap_methods {
() => {};
}
#[cfg(feature = "async")]
#[macro_export]
#[doc(hidden)]
macro_rules! __async_methods {
($name:ident) => {
pub async fn load_async() -> ::core::result::Result<Self, $crate::Error> {
Self::dynamic_config_builder()?.load_async().await
}
pub async fn init_async() -> ::core::result::Result<(), $crate::Error> {
Self::dynamic_config_builder()?.init_async().await
}
pub fn changes() -> $crate::Changes<Self> {
Self::dynamic_config_cell().changes()
}
};
}
#[cfg(feature = "async")]
#[macro_export]
#[doc(hidden)]
macro_rules! __async_remote_methods {
() => {
pub fn set_remote_async(source: impl $crate::AsyncRemoteSource) {
Self::dynamic_config_remote().set_async(source);
}
pub async fn refresh_remote_async() -> ::core::result::Result<(), $crate::Error> {
Self::dynamic_config_remote().refresh_async().await
}
};
}
#[cfg(not(feature = "async"))]
#[macro_export]
#[doc(hidden)]
macro_rules! __async_remote_methods {
() => {};
}
#[cfg(not(feature = "async"))]
#[macro_export]
#[doc(hidden)]
macro_rules! __async_methods {
($name:ident) => {};
}