pub struct DependencyResolver { /* private fields */ }Expand description
High-level dependency resolver
Implementations§
Source§impl DependencyResolver
impl DependencyResolver
Sourcepub fn with_options(options: ResolutionOptions) -> Self
pub fn with_options(options: ResolutionOptions) -> Self
Create a resolver with custom options
Sourcepub fn with_availability_checker(
self,
checker: Arc<dyn AvailabilityChecker>,
) -> Self
pub fn with_availability_checker( self, checker: Arc<dyn AvailabilityChecker>, ) -> Self
Set availability checker
Sourcepub async fn register_tool(&self, tool_spec: ToolSpec) -> Result<()>
pub async fn register_tool(&self, tool_spec: ToolSpec) -> Result<()>
Register a tool specification
Sourcepub async fn resolve(&self, tool_name: &str) -> Result<ResolutionResult>
pub async fn resolve(&self, tool_name: &str) -> Result<ResolutionResult>
Resolve dependencies for a tool
Sourcepub async fn resolve_multiple(
&self,
tool_names: &[String],
) -> Result<ResolutionResult>
pub async fn resolve_multiple( &self, tool_names: &[String], ) -> Result<ResolutionResult>
Resolve dependencies for multiple tools
Sourcepub async fn is_tool_registered(&self, tool_name: &str) -> bool
pub async fn is_tool_registered(&self, tool_name: &str) -> bool
Check if a tool is registered
Sourcepub async fn get_tool_spec(&self, tool_name: &str) -> Option<ToolSpec>
pub async fn get_tool_spec(&self, tool_name: &str) -> Option<ToolSpec>
Get tool specification
Sourcepub async fn get_all_tools(&self) -> Vec<String>
pub async fn get_all_tools(&self) -> Vec<String>
Get all registered tools
Sourcepub async fn clear_cache(&self)
pub async fn clear_cache(&self)
Clear resolution cache
Sourcepub async fn get_stats(&self) -> GraphStats
pub async fn get_stats(&self) -> GraphStats
Get dependency graph statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DependencyResolver
impl !RefUnwindSafe for DependencyResolver
impl Send for DependencyResolver
impl Sync for DependencyResolver
impl Unpin for DependencyResolver
impl !UnwindSafe for DependencyResolver
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