pub struct DepGraphLayout {
pub deep: bool,
pub nodes: Vec<LaidNode>,
pub edges: Vec<LaidEdge>,
/* private fields */
}Expand description
The complete laid-out dependency graph in one display mode.
Fields§
§deep: booltrue when the layout is the full transitive closure (deep mode).
nodes: Vec<LaidNode>§edges: Vec<LaidEdge>Implementations§
Source§impl DepGraphLayout
impl DepGraphLayout
Sourcepub fn build(
repos: &[String],
edges: &[DepEdge],
deep: bool,
collapsed: &BTreeSet<String>,
) -> Self
pub fn build( repos: &[String], edges: &[DepEdge], deep: bool, collapsed: &BTreeSet<String>, ) -> Self
Build a layout from the node set + the recorded edges.
repos— every node to place (so isolated nodes still show).edges—fromdepends onto.deep— false → only direct edges; true → also synthesise the transitive- closure edges (flaggedEdgeClass::Transitive).collapsed— nodes the user collapsed; their exclusively-owned subtree is dropped from both nodes and edges.
Sourcepub fn transitive_closure(repo: &str, edges: &[DepEdge]) -> BTreeSet<String>
pub fn transitive_closure(repo: &str, edges: &[DepEdge]) -> BTreeSet<String>
The transitive dependency closure of repo over the recorded direct
edges — every node reachable following from → to, excluding repo.
Sourcepub fn visible(&self) -> Vec<String>
pub fn visible(&self) -> Vec<String>
The nodes currently visible (after applying the collapse set).
Sourcepub fn position(&self, repo: &str) -> Option<(usize, usize)>
pub fn position(&self, repo: &str) -> Option<(usize, usize)>
Look up a node’s (col, row) by name.
pub fn direct_edges(&self) -> usize
pub fn transitive_edges(&self) -> usize
Sourcepub fn state_json(&self) -> Value
pub fn state_json(&self) -> Value
The introspection blob (LAW 6): mode, node positions, classified edges, and the collapse set — so a robot test sees exactly what is painted.
Trait Implementations§
Source§impl Clone for DepGraphLayout
impl Clone for DepGraphLayout
Source§fn clone(&self) -> DepGraphLayout
fn clone(&self) -> DepGraphLayout
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 moreAuto Trait Implementations§
impl Freeze for DepGraphLayout
impl RefUnwindSafe for DepGraphLayout
impl Send for DepGraphLayout
impl Sync for DepGraphLayout
impl Unpin for DepGraphLayout
impl UnsafeUnpin for DepGraphLayout
impl UnwindSafe for DepGraphLayout
Blanket Implementations§
impl<T> Allocation for T
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