Struct libreda_db::reference_access::NetRef
source · 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§
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.