pub struct Config {
pub plugin_dir: PathBuf,
pub registry_file: PathBuf,
pub verify_on_install: bool,
pub auto_register: bool,
pub check_dependencies: bool,
pub max_concurrent_installs: usize,
pub cache_dir: PathBuf,
pub verbose: bool,
pub backup_on_upgrade: bool,
}Expand description
Configuration for plugin-packager
Fields§
§plugin_dir: PathBufDefault plugin installation directory
registry_file: PathBufRegistry file path
verify_on_install: boolWhether to auto-verify artifacts on install
auto_register: boolWhether to auto-register plugins in local registry
check_dependencies: boolWhether to check dependencies before installation
max_concurrent_installs: usizeMaximum concurrent plugin installations
cache_dir: PathBufCache directory for downloaded packages
verbose: boolEnable verbose logging
backup_on_upgrade: boolBackup existing plugins before upgrade
Implementations§
Source§impl Config
impl Config
Sourcepub fn load_or_default(path: &Path) -> Result<Self>
pub fn load_or_default(path: &Path) -> Result<Self>
Load configuration from file, or return default if not found
Sourcepub fn config_path() -> Result<PathBuf>
pub fn config_path() -> Result<PathBuf>
Get the configuration file path (creating parent directories if needed)
Sourcepub fn ensure_plugin_dir(&self) -> Result<()>
pub fn ensure_plugin_dir(&self) -> Result<()>
Ensure plugin directory exists
Sourcepub fn ensure_cache_dir(&self) -> Result<()>
pub fn ensure_cache_dir(&self) -> Result<()>
Ensure cache directory exists
Sourcepub fn ensure_registry_dir(&self) -> Result<()>
pub fn ensure_registry_dir(&self) -> Result<()>
Ensure registry directory exists
Sourcepub fn ensure_all_dirs(&self) -> Result<()>
pub fn ensure_all_dirs(&self) -> Result<()>
Ensure all required directories exist
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more