pub struct RcGraph { /* private fields */ }Expand description
A directed graph where nodes are reference-counted.
Implementations§
Source§impl RcGraph
impl RcGraph
Sourcepub fn remove_edge(&mut self, src: u32, dst: u32) -> bool
pub fn remove_edge(&mut self, src: u32, dst: u32) -> bool
Remove an edge and decrement destination refcount.
Sourcepub fn remove_node(&mut self, id: u32)
pub fn remove_node(&mut self, id: u32)
Remove a node (and all edges from it).
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Number of nodes.
Sourcepub fn edge_count(&self) -> usize
pub fn edge_count(&self) -> usize
Number of edges.
Sourcepub fn zero_refcount_nodes(&self) -> Vec<u32>
pub fn zero_refcount_nodes(&self) -> Vec<u32>
Nodes with zero refcount (potential garbage).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RcGraph
impl RefUnwindSafe for RcGraph
impl Send for RcGraph
impl Sync for RcGraph
impl Unpin for RcGraph
impl UnsafeUnpin for RcGraph
impl UnwindSafe for RcGraph
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