pub struct NetRef<'a, N: NetlistBase + ?Sized> {
pub(super) base: &'a N,
pub(super) id: N::NetId,
}
Expand description
A reference to a net. This is just a wrapper around a netlist and a net ID.
Fields
base: &'a N
Reference to the parent data structure.
id: N::NetId
ID of the net.
Implementations
sourceimpl<'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.
sourceimpl<'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.
Auto Trait Implementations
impl<'a, N: ?Sized> RefUnwindSafe for NetRef<'a, N> where
N: RefUnwindSafe,
<N as NetlistBase>::NetId: RefUnwindSafe,
impl<'a, N: ?Sized> Send for NetRef<'a, N> where
N: Sync,
<N as NetlistBase>::NetId: Send,
impl<'a, N: ?Sized> Sync for NetRef<'a, N> where
N: Sync,
<N as NetlistBase>::NetId: Sync,
impl<'a, N: ?Sized> Unpin for NetRef<'a, N> where
<N as NetlistBase>::NetId: Unpin,
impl<'a, N: ?Sized> UnwindSafe for NetRef<'a, N> where
N: RefUnwindSafe,
<N as NetlistBase>::NetId: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more