pub struct NetRef<'a, N>where
N: NetlistBase + ?Sized,{ /* private fields */ }Expand description
A reference to a net. This is just a wrapper around a netlist and a net ID.
Implementations§
Source§impl<'a, N> NetRef<'a, N>where
N: NetlistBase,
impl<'a, N> NetRef<'a, N>where
N: NetlistBase,
Sourcepub fn id(&self) -> <N as NetlistBase>::NetId
pub fn id(&self) -> <N as NetlistBase>::NetId
Get the net ID.
Sourcepub fn name(&self) -> Option<<N as HierarchyBase>::NameType>
pub fn name(&self) -> Option<<N as HierarchyBase>::NameType>
Get the name of the net.
Sourcepub fn each_pin(&self) -> impl Iterator<Item = PinRef<'a, N>>
pub fn each_pin(&self) -> impl Iterator<Item = PinRef<'a, N>>
Iterate over each pin attached to this net.
Sourcepub fn each_pin_instance(&self) -> impl Iterator<Item = PinInstRef<'a, N>>
pub fn each_pin_instance(&self) -> impl Iterator<Item = PinInstRef<'a, N>>
Iterate over each pin instance attached to this net.
Sourcepub fn each_terminal(&self) -> impl Iterator<Item = TerminalRef<'a, N>>
pub fn each_terminal(&self) -> impl Iterator<Item = TerminalRef<'a, N>>
Iterate over terminal attached to this net.
Sourcepub fn each_driver(&self) -> impl Iterator<Item = TerminalRef<'a, N>>
pub fn each_driver(&self) -> impl Iterator<Item = TerminalRef<'a, N>>
Iterate over all terminals that drive the net. This should usually be one.
Returns the pins that are marked as inputs and pin instances marked as outputs.
Skips InOut terminals.
Sourcepub fn each_sink(&self) -> impl Iterator<Item = TerminalRef<'a, N>>
pub fn each_sink(&self) -> impl Iterator<Item = TerminalRef<'a, N>>
Iterate over all terminals that drive the net. This should usually be one.
Returns the pins that are marked as inputs and pin instances marked as outputs.
Skips InOut terminals.
Sourcepub fn num_pins(&self) -> usize
pub fn num_pins(&self) -> usize
Get the number of external pins attached to this net (pins towards the outside of the circuit).
Sourcepub fn num_pin_instances(&self) -> usize
pub fn num_pin_instances(&self) -> usize
Get the number of pin instances attached to this net. Excludes the pins towards the outside of the circuit.
Sourcepub fn num_terminals(&self) -> usize
pub fn num_terminals(&self) -> usize
Get the total number of pins and pin instances connected to this net.
Auto Trait Implementations§
impl<'a, N> Freeze for NetRef<'a, N>
impl<'a, N> RefUnwindSafe for NetRef<'a, N>
impl<'a, N> Send for NetRef<'a, N>
impl<'a, N> Sync for NetRef<'a, N>
impl<'a, N> Unpin for NetRef<'a, N>
impl<'a, N> UnwindSafe for NetRef<'a, N>
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
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>
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>
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