pub struct MulticonductorTerminalIndex { /* private fields */ }Expand description
Every declared terminal of a multiconductor network at one flat position.
Implementations§
Source§impl MulticonductorTerminalIndex
impl MulticonductorTerminalIndex
Sourcepub fn build(
network: &MulticonductorNetwork,
) -> Result<Self, TerminalIndexError>
pub fn build( network: &MulticonductorNetwork, ) -> Result<Self, TerminalIndexError>
Index network’s terminals: bus table order, each bus’s stated
terminal order. Grounded terminals and terminal 0 are indexed like
any other; whether a calculation treats one as ground is its own rule.
§Errors
Two buses whose identities differ only in ASCII case, or a bus that states a terminal twice.
Sourcepub fn terminals(&self) -> &[(String, String)]
pub fn terminals(&self) -> &[(String, String)]
Position to (bus, terminal), in the network’s own spelling.
Sourcepub fn resolve(&self, bus: &str, terminal: &str) -> Option<usize>
pub fn resolve(&self, bus: &str, terminal: &str) -> Option<usize>
The position of terminal terminal of bus bus (bus compared ASCII
case insensitively), or None for an undeclared terminal.
Sourcepub fn bus_terminals(&self, bus: &str) -> Vec<usize>
pub fn bus_terminals(&self, bus: &str) -> Vec<usize>
The positions of one bus’s terminals, ascending; empty for an undeclared bus.
Trait Implementations§
Source§impl Clone for MulticonductorTerminalIndex
impl Clone for MulticonductorTerminalIndex
Source§impl Debug for MulticonductorTerminalIndex
impl Debug for MulticonductorTerminalIndex
impl Eq for MulticonductorTerminalIndex
impl StructuralPartialEq for MulticonductorTerminalIndex
Auto Trait Implementations§
impl Freeze for MulticonductorTerminalIndex
impl RefUnwindSafe for MulticonductorTerminalIndex
impl Send for MulticonductorTerminalIndex
impl Sync for MulticonductorTerminalIndex
impl Unpin for MulticonductorTerminalIndex
impl UnsafeUnpin for MulticonductorTerminalIndex
impl UnwindSafe for MulticonductorTerminalIndex
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