pub struct DependencyResolver { /* private fields */ }Expand description
Dependency resolver for managing component dependencies
Provides dependency resolution, topological sorting, circular dependency detection, and version constraint satisfaction for complex component dependency graphs.
Implementations§
Source§impl DependencyResolver
impl DependencyResolver
Sourcepub fn add_component_dependencies(
&self,
component_id: &str,
component_type: &str,
version: &str,
dependencies: Vec<ComponentDependency>,
) -> SklResult<()>
pub fn add_component_dependencies( &self, component_id: &str, component_type: &str, version: &str, dependencies: Vec<ComponentDependency>, ) -> SklResult<()>
Add component dependencies to the graph
Sourcepub fn resolve_dependencies(
&self,
component_id: &str,
) -> SklResult<ResolutionResult>
pub fn resolve_dependencies( &self, component_id: &str, ) -> SklResult<ResolutionResult>
Resolve dependencies for a component
Sourcepub fn topological_sort(&self, component_id: &str) -> SklResult<Vec<String>>
pub fn topological_sort(&self, component_id: &str) -> SklResult<Vec<String>>
Perform topological sort for dependency resolution order
Sourcepub fn detect_circular_dependencies(&self) -> SklResult<Vec<CircularDependency>>
pub fn detect_circular_dependencies(&self) -> SklResult<Vec<CircularDependency>>
Detect circular dependencies
Sourcepub fn check_compatibility(
&self,
component_a: &str,
component_b: &str,
) -> SklResult<CompatibilityResult>
pub fn check_compatibility( &self, component_a: &str, component_b: &str, ) -> SklResult<CompatibilityResult>
Check dependency compatibility
Sourcepub fn register_injection_provider<T: 'static>(
&self,
provider: Box<dyn DependencyProvider<T>>,
) -> SklResult<()>
pub fn register_injection_provider<T: 'static>( &self, provider: Box<dyn DependencyProvider<T>>, ) -> SklResult<()>
Register dependency injection provider
Sourcepub fn inject_dependencies(
&self,
component: &mut dyn PluggableComponent,
) -> SklResult<()>
pub fn inject_dependencies( &self, component: &mut dyn PluggableComponent, ) -> SklResult<()>
Inject dependencies into a component
Sourcepub fn get_statistics(&self) -> DependencyStatistics
pub fn get_statistics(&self) -> DependencyStatistics
Get dependency statistics
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Clear resolution cache
Trait Implementations§
Source§impl Debug for DependencyResolver
impl Debug for DependencyResolver
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more