pub struct RelationGraph { /* private fields */ }Implementations§
Source§impl RelationGraph
impl RelationGraph
pub fn insert_symbol(&mut self, identity: SymbolIdentity) -> NodeId
pub fn pin_symbol(&mut self, identity: SymbolIdentity) -> NodeId
pub fn pin(&mut self, node_id: NodeId) -> bool
pub fn unpin(&mut self, node_id: NodeId) -> bool
pub fn anchors(&self) -> &[NodeId]
pub fn is_anchor(&self, node_id: NodeId) -> bool
pub fn contains(&self, node_id: NodeId) -> bool
pub fn node(&self, node_id: NodeId) -> Option<&GraphNode>
pub fn node_mut(&mut self, node_id: NodeId) -> Option<&mut GraphNode>
pub fn nodes_named(&self, symbol: &str, kind: HierarchyKind) -> Vec<NodeId>
pub fn resolve_id(&self, node_id: NodeId) -> Option<NodeId>
pub fn resolve_symbol( &mut self, node_id: NodeId, identity: SymbolIdentity, ) -> Option<NodeId>
pub fn replace_branch_neighbors( &mut self, node_id: NodeId, direction: HierarchyDirection, children: Vec<SymbolIdentity>, ) -> Option<Vec<NodeId>>
pub fn clear_branch( &mut self, node_id: NodeId, direction: HierarchyDirection, ) -> bool
pub fn visible_graph(&self) -> VisibleGraph
Sourcepub fn known_graph(&self) -> VisibleGraph
pub fn known_graph(&self) -> VisibleGraph
Returns every relation currently known from an anchor, including cached branches that are collapsed in the canvas. Orphaned storage left behind after unpinning or clearing a branch is intentionally excluded.
pub fn node_count(&self) -> usize
pub fn edge_count(&self) -> usize
Trait Implementations§
Source§impl Debug for RelationGraph
impl Debug for RelationGraph
Source§impl Default for RelationGraph
impl Default for RelationGraph
Source§fn default() -> RelationGraph
fn default() -> RelationGraph
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RelationGraph
impl RefUnwindSafe for RelationGraph
impl Send for RelationGraph
impl Sync for RelationGraph
impl Unpin for RelationGraph
impl UnsafeUnpin for RelationGraph
impl UnwindSafe for RelationGraph
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