Struct libreda_db::netlist::rc_netlist::circuit_instance::CircuitInstance [−][src]
Represents an instantiation of a Circuit
(a sub-circuit).
Implementations
impl CircuitInstance
[src]
pub fn parent_circuit(&self) -> Weak<Circuit>
[src]
Gets the parent circuit where this instance lives in.
pub fn circuit_ref(&self) -> Weak<Circuit>
[src]
Gets the circuit template referenced by this instance.
pub fn circuit_id(&self) -> CircuitIndex
[src]
Gets the ID of the circuit template referenced by this instance.
pub fn connect_pin_by_id(
&self,
pin_instance_id: usize,
net: Option<Rc<Net>>
) -> Option<Rc<Net>>
[src]
&self,
pin_instance_id: usize,
net: Option<Rc<Net>>
) -> Option<Rc<Net>>
Connect a pin on the outside of the sub circuit to a net that is defined in the parent circuit.
Returns the previously connected net.
Panics
Panics if the supplied net does not exist in the parent circuit. Also panics if the referenced pin does not exist.
pub fn connect_pin(
&self,
pin: &Rc<PinInstance>,
net: Option<Rc<Net>>
) -> Option<Rc<Net>>
[src]
&self,
pin: &Rc<PinInstance>,
net: Option<Rc<Net>>
) -> Option<Rc<Net>>
Connect a pin on the outside of the sub circuit to a net that is defined in the parent circuit.
Returns the previously connected net.
Panics
- Panics if the pin instance does not live in this circuit instance.
- Panics if the net does not live in the same parent circuit as this circuit instance.
pub fn disconnect_pin_by_id(&self, pin_instance_id: usize) -> Option<Rc<Net>>
[src]
Disconnects a pin on the outside from the attached net.
Short-cut for .connect_pin_by_id(pin_id, None)
.
Returns the previously connected net.
Panics
Panics if the referenced pin does not exist.
pub fn disconnect_pin(&self, pin_instance: &Rc<PinInstance>) -> Option<Rc<Net>>
[src]
Disconnects a pin on the outside from the attached net.
Short-cut for .connect_pin(pin_instance, None)
.
Returns the previously connected net.
pub fn each_pin_instance(
&self
) -> impl Iterator<Item = &Rc<PinInstance>> + ExactSizeIterator
[src]
&self
) -> impl Iterator<Item = &Rc<PinInstance>> + ExactSizeIterator
Iterate over all pins instances.
pub fn each_pin_instance_vec(&self) -> Vec<Rc<PinInstance>>
[src]
Get a Vec
with all pins instances.
pub fn id(&self) -> CircuitInstIndex
[src]
Get index of this circuit instance.
pub fn name(&self) -> Option<&String>
[src]
Get the name of this circuit instance.
pub fn net_for_pin(&self, pin_index: usize) -> Option<Rc<Net>>
[src]
pub fn pin_count(&self) -> usize
[src]
Return the number of pins.
pub fn pin_instance_by_id(&self, pin_index: usize) -> Rc<PinInstance>
[src]
Trait Implementations
impl Debug for CircuitInstance
[src]
impl Eq for CircuitInstance
[src]
impl Hash for CircuitInstance
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<CircuitInstance> for CircuitInstance
[src]
Auto Trait Implementations
impl !RefUnwindSafe for CircuitInstance
impl !Send for CircuitInstance
impl !Sync for CircuitInstance
impl Unpin for CircuitInstance
impl !UnwindSafe for CircuitInstance
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,