pub trait ConfigManager: Send + Sync {
// Required methods
fn load_config<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<ManifestConfig>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save_config<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: &'life1 ManifestConfig,
path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_dependency<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 DependencySpec,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn validate_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigValidation>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_project_root(&self) -> &Path;
fn backup_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigBackup>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn restore_backup<'life0, 'async_trait>(
&'life0 self,
backup: ConfigBackup,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn remove_backup<'life0, 'async_trait>(
&'life0 self,
backup: ConfigBackup,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Unified configuration management interface
Required Methods§
Sourcefn load_config<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<ManifestConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_config<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<ManifestConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load configuration file
Sourcefn save_config<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: &'life1 ManifestConfig,
path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_config<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: &'life1 ManifestConfig,
path: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Save configuration file
Sourcefn update_dependency<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 DependencySpec,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_dependency<'life0, 'life1, 'async_trait>(
&'life0 self,
spec: &'life1 DependencySpec,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update dependency configuration
Sourcefn validate_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigValidation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigValidation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Validate configuration file
Sourcefn get_project_root(&self) -> &Path
fn get_project_root(&self) -> &Path
Get project root directory
Sourcefn backup_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigBackup>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn backup_config<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigBackup>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Back up current configuration
Sourcefn restore_backup<'life0, 'async_trait>(
&'life0 self,
backup: ConfigBackup,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn restore_backup<'life0, 'async_trait>(
&'life0 self,
backup: ConfigBackup,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Restore configuration backup
Sourcefn remove_backup<'life0, 'async_trait>(
&'life0 self,
backup: ConfigBackup,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_backup<'life0, 'async_trait>(
&'life0 self,
backup: ConfigBackup,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Remove configuration backup
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".