Skip to main content

ConfigWriter

Trait ConfigWriter 

Source
pub trait ConfigWriter: Send + Sync {
    // Required methods
    fn write_config(&self, path: &Path, server_path: &str) -> Result<()>;
    fn config_exists(&self, path: &Path) -> Result<bool>;
    fn backup_config(&self, path: &Path) -> Result<Option<PathBuf>>;
}
Expand description

Trait for writing MCP configurations to different file formats

Required Methods§

Source

fn write_config(&self, path: &Path, server_path: &str) -> Result<()>

Write or update the configuration for kindly-guard

Source

fn config_exists(&self, path: &Path) -> Result<bool>

Check if the configuration already exists

Source

fn backup_config(&self, path: &Path) -> Result<Option<PathBuf>>

Create a backup of the existing configuration

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§