Struct libreda_db::reference_access::PinRef
source · pub struct PinRef<'a, N: NetlistBase + ?Sized> {
pub(super) base: &'a N,
pub(super) id: N::PinId,
}
Expand description
A reference to a pin. This is just a wrapper around a netlist and a pin ID.
Fields§
§base: &'a N
Reference to the parent data structure.
id: N::PinId
ID of the pin.
Implementations§
source§impl<'a, L: L2NBase> PinRef<'a, L>
impl<'a, L: L2NBase> PinRef<'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 pin.
source§impl<'a, N: NetlistBase> PinRef<'a, N>
impl<'a, N: NetlistBase> PinRef<'a, N>
sourcepub fn terminal_id(&self) -> TerminalId<N>
pub fn terminal_id(&self) -> TerminalId<N>
Get the terminal ID of this pin.
sourcepub fn net(&self) -> Option<NetRef<'a, N>>
pub fn net(&self) -> Option<NetRef<'a, N>>
Get the net which is attached to the pin from inside the cell.
sourcepub fn instance(&self, cell_inst: &N::CellInstId) -> PinInstRef<'a, N>
pub fn instance(&self, cell_inst: &N::CellInstId) -> PinInstRef<'a, N>
Find the instance of this pin in the given cell instance.
sourcepub fn into_terminal(self) -> TerminalRef<'a, N>
pub fn into_terminal(self) -> TerminalRef<'a, N>
Convert the pin reference into a terminal reference.