pub struct ConfigLoader;Expand description
Configuration loader for hooks
Loads hooks from YAML configuration files following a hierarchy:
- Runtime configuration (passed programmatically)
- Project configuration (.ricecoder/hooks.yaml)
- User configuration (~/.ricecoder/hooks.yaml)
- Built-in configuration
- Fallback (empty configuration)
Implementations§
Source§impl ConfigLoader
impl ConfigLoader
Sourcepub fn load() -> Result<HashMap<String, Hook>>
pub fn load() -> Result<HashMap<String, Hook>>
Load hooks from configuration files
Attempts to load hooks from the following locations in order:
- Project configuration (.ricecoder/hooks.yaml)
- User configuration (~/.ricecoder/hooks.yaml)
- Built-in configuration
Returns a map of hook ID to Hook configuration.
§Errors
Returns an error if configuration files are invalid or cannot be read.
Auto Trait Implementations§
impl Freeze for ConfigLoader
impl RefUnwindSafe for ConfigLoader
impl Send for ConfigLoader
impl Sync for ConfigLoader
impl Unpin for ConfigLoader
impl UnwindSafe for ConfigLoader
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