pub struct Topology { /* private fields */ }Expand description
Graph-based network topology
Implementations§
Source§impl Topology
impl Topology
Sourcepub fn add_branch(
&mut self,
from: NodeIndex,
to: NodeIndex,
branch_id: BranchId,
)
pub fn add_branch( &mut self, from: NodeIndex, to: NodeIndex, branch_id: BranchId, )
Add a branch between two buses
Sourcepub fn branch_count(&self) -> usize
pub fn branch_count(&self) -> usize
Number of branches (edges / 2 for undirected)
Sourcepub fn graph(&self) -> &DiGraph<TopologyNode, TopologyEdge>
pub fn graph(&self) -> &DiGraph<TopologyNode, TopologyEdge>
Get reference to internal graph
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Topology
impl RefUnwindSafe for Topology
impl Send for Topology
impl Sync for Topology
impl Unpin for Topology
impl UnwindSafe for Topology
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)