pub struct ConfigManager { /* private fields */ }Expand description
Manages refactoring configurations and providers with storage integration
Implementations§
Source§impl ConfigManager
impl ConfigManager
Sourcepub fn with_storage(storage: Arc<dyn StorageManager>) -> Self
pub fn with_storage(storage: Arc<dyn StorageManager>) -> Self
Create a new configuration manager with storage integration
Sourcepub fn with_provider_registry(provider_registry: ProviderRegistry) -> Self
pub fn with_provider_registry(provider_registry: ProviderRegistry) -> Self
Create a new configuration manager with a provider registry
Sourcepub fn with_storage_and_registry(
storage: Arc<dyn StorageManager>,
provider_registry: ProviderRegistry,
) -> Self
pub fn with_storage_and_registry( storage: Arc<dyn StorageManager>, provider_registry: ProviderRegistry, ) -> Self
Create a new configuration manager with both storage and provider registry
Sourcepub fn set_storage(&mut self, storage: Arc<dyn StorageManager>)
pub fn set_storage(&mut self, storage: Arc<dyn StorageManager>)
Set the storage manager
Sourcepub fn get_storage(&self) -> Option<&Arc<dyn StorageManager>>
pub fn get_storage(&self) -> Option<&Arc<dyn StorageManager>>
Get the storage manager
Sourcepub async fn set_provider_registry(
&self,
registry: ProviderRegistry,
) -> Result<()>
pub async fn set_provider_registry( &self, registry: ProviderRegistry, ) -> Result<()>
Set the provider registry
Sourcepub async fn get_provider_registry(&self) -> Result<Option<ProviderRegistry>>
pub async fn get_provider_registry(&self) -> Result<Option<ProviderRegistry>>
Get the provider registry
Sourcepub async fn register_config(&self, config: RefactoringConfig) -> Result<()>
pub async fn register_config(&self, config: RefactoringConfig) -> Result<()>
Register a configuration for a language
Sourcepub async fn get_config(
&self,
language: &str,
) -> Result<Option<RefactoringConfig>>
pub async fn get_config( &self, language: &str, ) -> Result<Option<RefactoringConfig>>
Get configuration for a language
If storage is configured, loads from storage with hierarchy support. Otherwise, returns cached configuration.
Sourcepub async fn load_and_register(&self, path: &Path) -> Result<()>
pub async fn load_and_register(&self, path: &Path) -> Result<()>
Load configuration from a file and register it
Sourcepub async fn get_languages(&self) -> Result<Vec<String>>
pub async fn get_languages(&self) -> Result<Vec<String>>
Get all registered languages
If storage is configured, returns all available languages from storage. Otherwise, returns cached languages.
Sourcepub async fn has_language(&self, language: &str) -> Result<bool>
pub async fn has_language(&self, language: &str) -> Result<bool>
Check if a language is configured
If storage is configured, checks storage for configuration. Otherwise, checks cached configurations.