pub struct WorkspaceGraph { /* private fields */ }Expand description
Validated package graph for one multi-ecosystem workspace.
Implementations§
Source§impl WorkspaceGraph
impl WorkspaceGraph
Sourcepub fn new(packages: Vec<PackageSnapshot>) -> Result<Self, WorkspaceGraphError>
pub fn new(packages: Vec<PackageSnapshot>) -> Result<Self, WorkspaceGraphError>
Builds a graph from discovered packages and their internal dependencies.
pub fn package(&self, id: &PackageId) -> Option<&PackageSnapshot>
pub fn packages(&self) -> impl Iterator<Item = &PackageSnapshot>
Sourcepub fn topological_order(&self) -> Result<Vec<PackageId>, WorkspaceGraphError>
pub fn topological_order(&self) -> Result<Vec<PackageId>, WorkspaceGraphError>
Returns a stable order where every dependency precedes its dependents.
Trait Implementations§
Source§impl Clone for WorkspaceGraph
impl Clone for WorkspaceGraph
Source§fn clone(&self) -> WorkspaceGraph
fn clone(&self) -> WorkspaceGraph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WorkspaceGraph
impl Debug for WorkspaceGraph
impl Eq for WorkspaceGraph
Source§impl PartialEq for WorkspaceGraph
impl PartialEq for WorkspaceGraph
impl StructuralPartialEq for WorkspaceGraph
Auto Trait Implementations§
impl Freeze for WorkspaceGraph
impl RefUnwindSafe for WorkspaceGraph
impl Send for WorkspaceGraph
impl Sync for WorkspaceGraph
impl Unpin for WorkspaceGraph
impl UnsafeUnpin for WorkspaceGraph
impl UnwindSafe for WorkspaceGraph
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