pub trait ConfigManager: Send + Sync {
// Required methods
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Config>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Config>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 Config,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_section<'life0, 'life1, 'async_trait, T>(
&'life0 self,
section: &'life1 str,
data: T,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where T: Send + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn backup<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn restore<'life0, 'life1, 'async_trait>(
&'life0 self,
backup_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
High-level configuration management interface
Required Methods§
Sourcefn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Config>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Config>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize configuration with defaults
Sourcefn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Config>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Config>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load current configuration
Sourcefn save<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 Config,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
config: &'life1 Config,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save configuration
Sourcefn update_section<'life0, 'life1, 'async_trait, T>(
&'life0 self,
section: &'life1 str,
data: T,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
fn update_section<'life0, 'life1, 'async_trait, T>( &'life0 self, section: &'life1 str, data: T, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
Update specific configuration section
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.