pub struct PackageResolver { /* private fields */ }Expand description
Package resolver for unified skill resolution
Implementations§
Source§impl PackageResolver
impl PackageResolver
Sourcepub fn new(sources_manager: Arc<SourcesManager>) -> Self
pub fn new(sources_manager: Arc<SourcesManager>) -> Self
Create a new package resolver
Sourcepub async fn build_index(&mut self) -> Result<(), ResolverError>
pub async fn build_index(&mut self) -> Result<(), ResolverError>
Build the unified skill index from all sources
Sourcepub fn resolve_skill(
&self,
skill_id: &str,
version_constraint: Option<&VersionConstraint>,
source_name: Option<&str>,
strategy: ConflictStrategy,
) -> Result<ResolutionResult, ResolverError>
pub fn resolve_skill( &self, skill_id: &str, version_constraint: Option<&VersionConstraint>, source_name: Option<&str>, strategy: ConflictStrategy, ) -> Result<ResolutionResult, ResolverError>
Resolve a skill by ID
Sourcepub fn get_available_versions(&self, skill_id: &str) -> Vec<&SkillCandidate>
pub fn get_available_versions(&self, skill_id: &str) -> Vec<&SkillCandidate>
Get all available versions of a skill
Sourcepub fn skill_exists(&self, skill_id: &str) -> bool
pub fn skill_exists(&self, skill_id: &str) -> bool
Check if a skill exists in any source
Sourcepub fn list_skills(&self) -> Vec<String>
pub fn list_skills(&self) -> Vec<String>
Get all skill IDs available
Sourcepub fn resolve_dependencies(
&self,
skill_id: &str,
dependencies: &[Dependency],
strategy: ConflictStrategy,
) -> Result<Vec<ResolutionResult>, ResolverError>
pub fn resolve_dependencies( &self, skill_id: &str, dependencies: &[Dependency], strategy: ConflictStrategy, ) -> Result<Vec<ResolutionResult>, ResolverError>
Resolve dependencies for a skill
Note: This method resolves dependencies across sources (finding which source
provides each dependency). For graph structure management and topological sorting,
see DependencyGraph in the dependencies module. The two serve different purposes:
- PackageResolver: Source resolution (which source has the skill/version)
- DependencyGraph: Graph structure and installation order
Auto Trait Implementations§
impl Freeze for PackageResolver
impl !RefUnwindSafe for PackageResolver
impl Send for PackageResolver
impl Sync for PackageResolver
impl Unpin for PackageResolver
impl UnsafeUnpin for PackageResolver
impl !UnwindSafe for PackageResolver
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.