pub struct ConflictDetector { /* private fields */ }Expand description
Detects and resolves version conflicts
Implementations§
Source§impl ConflictDetector
impl ConflictDetector
pub fn new() -> Self
Sourcepub fn requirements(&self) -> &HashMap<ResourceId, Vec<ConflictingRequirement>>
pub fn requirements(&self) -> &HashMap<ResourceId, Vec<ConflictingRequirement>>
Get a reference to the internal requirements map.
This is used by the backtracking resolver to populate its resource registry for conflict detection during version changes.
Sourcepub fn add_requirement(
&mut self,
resource: ResourceId,
required_by: &str,
version_constraint: &str,
resolved_sha: &str,
)
pub fn add_requirement( &mut self, resource: ResourceId, required_by: &str, version_constraint: &str, resolved_sha: &str, )
Add a dependency requirement with optional parent metadata
Sourcepub fn add_requirement_with_parent(
&mut self,
resource: ResourceId,
required_by: &str,
version_constraint: &str,
resolved_sha: &str,
parent_version_constraint: Option<String>,
parent_resolved_sha: Option<String>,
)
pub fn add_requirement_with_parent( &mut self, resource: ResourceId, required_by: &str, version_constraint: &str, resolved_sha: &str, parent_version_constraint: Option<String>, parent_resolved_sha: Option<String>, )
Add a dependency requirement with full parent metadata for backtracking
Sourcepub fn detect_conflicts(&self) -> Vec<VersionConflict>
pub fn detect_conflicts(&self) -> Vec<VersionConflict>
Detect conflicts in the current requirements
Sourcepub fn resolve_conflicts(
&self,
available_versions: &HashMap<ResourceId, Vec<Version>>,
) -> Result<HashMap<ResourceId, Version>>
pub fn resolve_conflicts( &self, available_versions: &HashMap<ResourceId, Vec<Version>>, ) -> Result<HashMap<ResourceId, Version>>
Try to resolve conflicts by finding compatible versions
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConflictDetector
impl RefUnwindSafe for ConflictDetector
impl Send for ConflictDetector
impl Sync for ConflictDetector
impl Unpin for ConflictDetector
impl UnwindSafe for ConflictDetector
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 more