Trait libreda_db::netlist::util::NetlistUtil
source · pub trait NetlistUtil: NetlistBase {
// Provided methods
fn net_of_terminal(
&self,
terminal: &TerminalId<Self>
) -> Option<Self::NetId> { ... }
fn for_each_terminal_of_net<F>(&self, net: &Self::NetId, f: F)
where F: FnMut(TerminalId<Self>) { ... }
fn each_terminal_of_net_vec(
&self,
net: &Self::NetId
) -> Vec<TerminalId<Self>> { ... }
fn each_terminal_of_net<'a>(
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = TerminalId<Self>> + 'a> { ... }
fn is_constant_net(&self, net: &Self::NetId) -> bool { ... }
fn nets_of_cell_instance(
&self,
inst: &Self::CellInstId
) -> Box<dyn Iterator<Item = Self::NetId> + '_> { ... }
fn for_each_circuit_instance_of_net<F>(&self, net: &Self::NetId, f: F)
where F: FnMut(Self::CellInstId) { ... }
fn each_circuit_instance_of_net_vec(
&self,
net: &Self::NetId
) -> Vec<Self::CellInstId> { ... }
fn fmt(&self, f: &mut Formatter<'_>) -> Result { ... }
}Expand description
Non-modifying utility functions for netlists.
Import the this trait to use the utility functions all types that implement the NetlistBase trait.
Provided Methods§
sourcefn net_of_terminal(&self, terminal: &TerminalId<Self>) -> Option<Self::NetId>
fn net_of_terminal(&self, terminal: &TerminalId<Self>) -> Option<Self::NetId>
Get the net that is attached to this terminal.
sourcefn for_each_terminal_of_net<F>(&self, net: &Self::NetId, f: F)where
F: FnMut(TerminalId<Self>),
fn for_each_terminal_of_net<F>(&self, net: &Self::NetId, f: F)where
F: FnMut(TerminalId<Self>),
Call a function for each terminal connected to this net.
sourcefn each_terminal_of_net_vec(&self, net: &Self::NetId) -> Vec<TerminalId<Self>>
fn each_terminal_of_net_vec(&self, net: &Self::NetId) -> Vec<TerminalId<Self>>
Get a Vec with all terminal IDs connected to this net.
sourcefn each_terminal_of_net<'a>(
&'a self,
net: &Self::NetId
) -> Box<dyn Iterator<Item = TerminalId<Self>> + 'a>
fn each_terminal_of_net<'a>( &'a self, net: &Self::NetId ) -> Box<dyn Iterator<Item = TerminalId<Self>> + 'a>
Iterate over all terminals of a net.
sourcefn is_constant_net(&self, net: &Self::NetId) -> bool
fn is_constant_net(&self, net: &Self::NetId) -> bool
Check if the net is either the constant LOW or HIGH.
sourcefn nets_of_cell_instance(
&self,
inst: &Self::CellInstId
) -> Box<dyn Iterator<Item = Self::NetId> + '_>
fn nets_of_cell_instance( &self, inst: &Self::CellInstId ) -> Box<dyn Iterator<Item = Self::NetId> + '_>
Get all nets that are connected to the circuit instance.
sourcefn for_each_circuit_instance_of_net<F>(&self, net: &Self::NetId, f: F)where
F: FnMut(Self::CellInstId),
fn for_each_circuit_instance_of_net<F>(&self, net: &Self::NetId, f: F)where
F: FnMut(Self::CellInstId),
Visit all circuit instances connected to this net. An instance is touched not more than once.
sourcefn each_circuit_instance_of_net_vec(
&self,
net: &Self::NetId
) -> Vec<Self::CellInstId>
fn each_circuit_instance_of_net_vec( &self, net: &Self::NetId ) -> Vec<Self::CellInstId>
Iterate over all circuit instances connected to this net. An instance is touched not more than once.
Object Safety§
This trait is not object safe.