pub struct CustomToolManager { /* private fields */ }Expand description
Custom-tool manager — loads and merges global + project custom tools.
Implementations§
Source§impl CustomToolManager
impl CustomToolManager
Sourcepub fn load() -> Self
pub fn load() -> Self
Load and merge global + project custom-tools configs.
Global config is loaded from ~/.config/tinyharness/custom_tools.json.
Project config is loaded from .tinyharness/custom_tools.json (walking up
from CWD). Project tools are appended to the global list (both run;
global first, then project).
Resolved from the ambient environment — use CustomToolManager::load_from
when the caller has a Paths.
Sourcepub fn load_from(paths: &Paths) -> Self
pub fn load_from(paths: &Paths) -> Self
Load and merge configs for an injected set of paths.
Global comes from paths.custom_tools_file(), project from the
.tinyharness/custom_tools.json walk-up starting at paths.project_dir().
Sourcepub fn from_config(config: CustomToolConfig) -> Self
pub fn from_config(config: CustomToolConfig) -> Self
Load from an explicit config (for testing).
Sourcepub fn custom_tools(&self) -> &[CustomToolDefinition]
pub fn custom_tools(&self) -> &[CustomToolDefinition]
Return the list of custom tool definitions.
Trait Implementations§
Source§impl Clone for CustomToolManager
impl Clone for CustomToolManager
Source§impl Debug for CustomToolManager
impl Debug for CustomToolManager
Auto Trait Implementations§
impl Freeze for CustomToolManager
impl RefUnwindSafe for CustomToolManager
impl Send for CustomToolManager
impl Sync for CustomToolManager
impl Unpin for CustomToolManager
impl UnsafeUnpin for CustomToolManager
impl UnwindSafe for CustomToolManager
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