pub struct NetRef<'a, 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, L: L2NBase> NetRef<'a, L>
impl<'a, L: L2NBase> NetRef<'a, L>
Sourcepub fn each_shape(&self) -> impl Iterator<Item = ShapeRef<'_, L>>
pub fn each_shape(&self) -> impl Iterator<Item = ShapeRef<'_, L>>
Iterate over all shapes attached to this net.
Source§impl<'a, N: NetlistBase> NetRef<'a, N>
impl<'a, N: NetlistBase> NetRef<'a, N>
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.
Trait Implementations§
Source§impl<'a, N: NetlistBase> PartialEq for NetRef<'a, N>
impl<'a, N: NetlistBase> PartialEq for NetRef<'a, N>
impl<'a, N: NetlistBase> Eq for NetRef<'a, N>
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