pub struct CommandConfigIntegration { /* private fields */ }Expand description
Integration layer for command configuration with ricecoder-commands
This struct provides methods to discover, load, and register command configurations from markdown files with the ricecoder-commands subsystem.
Implementations§
Source§impl CommandConfigIntegration
impl CommandConfigIntegration
Sourcepub fn new(loader: Arc<ConfigurationLoader>) -> Self
pub fn new(loader: Arc<ConfigurationLoader>) -> Self
Create a new command configuration integration
Sourcepub fn discover_command_configs(
&self,
paths: &[PathBuf],
) -> MarkdownConfigResult<Vec<ConfigFile>>
pub fn discover_command_configs( &self, paths: &[PathBuf], ) -> MarkdownConfigResult<Vec<ConfigFile>>
Sourcepub async fn load_command_configs(
&self,
paths: &[PathBuf],
) -> MarkdownConfigResult<(Vec<CommandConfig>, Vec<(PathBuf, String)>)>
pub async fn load_command_configs( &self, paths: &[PathBuf], ) -> MarkdownConfigResult<(Vec<CommandConfig>, Vec<(PathBuf, String)>)>
Sourcepub fn register_commands(
&self,
commands: Vec<CommandConfig>,
registrar: &mut dyn CommandRegistrar,
) -> MarkdownConfigResult<RegistrationResult>
pub fn register_commands( &self, commands: Vec<CommandConfig>, registrar: &mut dyn CommandRegistrar, ) -> MarkdownConfigResult<RegistrationResult>
Register command configurations with a registrar
This method registers command configurations using a generic registrar trait, allowing integration with any command registry implementation.
§Arguments
commands- Command configurations to registerregistrar- The command registrar to register with
§Returns
A tuple of (successful_count, error_count, errors)
Sourcepub async fn load_and_register_commands(
&self,
paths: &[PathBuf],
registrar: &mut dyn CommandRegistrar,
) -> MarkdownConfigResult<(usize, usize, Vec<(String, String)>)>
pub async fn load_and_register_commands( &self, paths: &[PathBuf], registrar: &mut dyn CommandRegistrar, ) -> MarkdownConfigResult<(usize, usize, Vec<(String, String)>)>
Auto Trait Implementations§
impl Freeze for CommandConfigIntegration
impl RefUnwindSafe for CommandConfigIntegration
impl Send for CommandConfigIntegration
impl Sync for CommandConfigIntegration
impl Unpin for CommandConfigIntegration
impl UnwindSafe for CommandConfigIntegration
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