pub struct ConfigManager;Expand description
Command configuration manager
Implementations§
Source§impl ConfigManager
impl ConfigManager
Sourcepub fn load_from_yaml<P: AsRef<Path>>(path: P) -> Result<CommandRegistry>
pub fn load_from_yaml<P: AsRef<Path>>(path: P) -> Result<CommandRegistry>
Load commands from a YAML file
Sourcepub fn load_from_json<P: AsRef<Path>>(path: P) -> Result<CommandRegistry>
pub fn load_from_json<P: AsRef<Path>>(path: P) -> Result<CommandRegistry>
Load commands from a JSON file
Sourcepub fn load_from_file<P: AsRef<Path>>(path: P) -> Result<CommandRegistry>
pub fn load_from_file<P: AsRef<Path>>(path: P) -> Result<CommandRegistry>
Load commands from a file (auto-detect format)
Sourcepub fn save_to_yaml<P: AsRef<Path>>(
registry: &CommandRegistry,
path: P,
) -> Result<()>
pub fn save_to_yaml<P: AsRef<Path>>( registry: &CommandRegistry, path: P, ) -> Result<()>
Save commands to a YAML file
Sourcepub fn save_to_json<P: AsRef<Path>>(
registry: &CommandRegistry,
path: P,
) -> Result<()>
pub fn save_to_json<P: AsRef<Path>>( registry: &CommandRegistry, path: P, ) -> Result<()>
Save commands to a JSON file
Sourcepub fn save_to_file<P: AsRef<Path>>(
registry: &CommandRegistry,
path: P,
) -> Result<()>
pub fn save_to_file<P: AsRef<Path>>( registry: &CommandRegistry, path: P, ) -> Result<()>
Save commands to a file (auto-detect format)
Sourcepub fn merge_registries(
registries: Vec<CommandRegistry>,
) -> Result<CommandRegistry>
pub fn merge_registries( registries: Vec<CommandRegistry>, ) -> Result<CommandRegistry>
Merge multiple registries
Auto Trait Implementations§
impl Freeze for ConfigManager
impl RefUnwindSafe for ConfigManager
impl Send for ConfigManager
impl Sync for ConfigManager
impl Unpin for ConfigManager
impl UnwindSafe for ConfigManager
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