pub struct DependencyGraph { /* private fields */ }Expand description
High-performance dependency graph
Implementations§
Source§impl DependencyGraph
impl DependencyGraph
Sourcepub fn add_package(&mut self, package: Package) -> Result<(), RezCoreError>
pub fn add_package(&mut self, package: Package) -> Result<(), RezCoreError>
Add a package to the graph
Sourcepub fn add_requirement(
&mut self,
requirement: PackageRequirement,
) -> Result<(), RezCoreError>
pub fn add_requirement( &mut self, requirement: PackageRequirement, ) -> Result<(), RezCoreError>
Add a requirement to the graph
Sourcepub fn add_constraint(
&mut self,
constraint: PackageRequirement,
) -> Result<(), RezCoreError>
pub fn add_constraint( &mut self, constraint: PackageRequirement, ) -> Result<(), RezCoreError>
Add a constraint
Sourcepub fn add_exclusion(
&mut self,
package_name: String,
) -> Result<(), RezCoreError>
pub fn add_exclusion( &mut self, package_name: String, ) -> Result<(), RezCoreError>
Add an exclusion
Sourcepub fn add_dependency_edge(
&mut self,
from_key: &str,
to_key: &str,
) -> Result<(), RezCoreError>
pub fn add_dependency_edge( &mut self, from_key: &str, to_key: &str, ) -> Result<(), RezCoreError>
Add a dependency edge between two packages
Sourcepub fn remove_package(&mut self, package_key: &str) -> Result<(), RezCoreError>
pub fn remove_package(&mut self, package_key: &str) -> Result<(), RezCoreError>
Remove a package from the graph
Sourcepub fn detect_conflicts(&self) -> Vec<DependencyConflict>
pub fn detect_conflicts(&self) -> Vec<DependencyConflict>
Detect conflicts in the dependency graph
Sourcepub fn apply_conflict_resolution(
&mut self,
resolution: ConflictResolution,
) -> Result<(), RezCoreError>
pub fn apply_conflict_resolution( &mut self, resolution: ConflictResolution, ) -> Result<(), RezCoreError>
Apply a conflict resolution to the graph
Sourcepub fn get_resolved_packages(&self) -> Result<Vec<Package>, RezCoreError>
pub fn get_resolved_packages(&self) -> Result<Vec<Package>, RezCoreError>
Get all resolved packages in topological order
Sourcepub fn get_stats(&self) -> GraphStats
pub fn get_stats(&self) -> GraphStats
Get graph statistics
Trait Implementations§
Source§impl Clone for DependencyGraph
impl Clone for DependencyGraph
Source§fn clone(&self) -> DependencyGraph
fn clone(&self) -> DependencyGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DependencyGraph
impl Debug for DependencyGraph
Auto Trait Implementations§
impl Freeze for DependencyGraph
impl RefUnwindSafe for DependencyGraph
impl Send for DependencyGraph
impl Sync for DependencyGraph
impl Unpin for DependencyGraph
impl UnwindSafe for DependencyGraph
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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