Struct libreda_pnr::db::PinInstance [−][src]
A PinInstance
represents the pin of a circuit instance.
Each PinInstance
corresponds to a Pin
definition of the instantiated circuit.
Implementations
impl PinInstance
[src]
pub fn circuit_instance(&self) -> Weak<CircuitInstance>
[src]
Get weak reference to the circuit instance where this pin instance lives in.
pub fn connect_net(&self, net: Option<Rc<Net>>) -> Option<Rc<Net>>
[src]
Connect the pin to the given net or disconnect it if None
is given as a net.
This is a shortcut for calling connect_pin_by_id
on the parent circuit instance.
Returns the previously connected net.
TODO: Remove this and use the connect_pin
function on the parent circuit?
pub fn disconnect_net(&self) -> Option<Rc<Net>>
[src]
Disconnect the pin from the internal net.
This is a shortcut for calling connect_pin_by_id
on the parent circuit instance.
Returns the previously connected net.
pub fn net(&self) -> Option<Rc<Net>>
[src]
Get the net that is connected to this pin instance, if any.
pub fn id(&self) -> usize
[src]
Get the pin ID.
pub fn pin(&self) -> &Rc<Pin>
[src]
Get the pin definition.
Trait Implementations
impl Debug for PinInstance
[src]
impl Eq for PinInstance
[src]
impl Hash for PinInstance
[src]
pub fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<PinInstance> for PinInstance
[src]
Auto Trait Implementations
impl !RefUnwindSafe for PinInstance
impl !Send for PinInstance
impl !Sync for PinInstance
impl Unpin for PinInstance
impl !UnwindSafe for PinInstance
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>,