Struct libreda_pnr::db::PinInstance[][src]

pub struct PinInstance { /* fields omitted */ }

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]

impl PartialEq<PinInstance> for PinInstance[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.