pub struct Port {
pub name: Id,
pub width: u64,
pub direction: Direction,
pub parent: PortParent,
pub attributes: Attributes,
}Expand description
Represents a port on a cell.
Fields§
§name: IdName of the port
width: u64Width of the port
direction: DirectionDirection of the port
parent: PortParentWeak pointer to this port’s parent
attributes: AttributesAttributes associated with this port.
Implementations§
source§impl Port
impl Port
sourcepub fn cell_parent(&self) -> RRC<Cell>
pub fn cell_parent(&self) -> RRC<Cell>
sourcepub fn is_constant(&self, val: u64, width: u64) -> bool
pub fn is_constant(&self, val: u64, width: u64) -> bool
Checks if this port is a constant of value: val.
sourcepub fn get_parent_name(&self) -> Id
pub fn get_parent_name(&self) -> Id
Gets name of parent object.
sourcepub fn parent_is_comb(&self) -> bool
pub fn parent_is_comb(&self) -> bool
Checks if parent is combinational component
sourcepub fn get_attribute<A>(&self, attr: A) -> Option<u64>where
A: Into<Attribute>,
pub fn get_attribute<A>(&self, attr: A) -> Option<u64>where A: Into<Attribute>,
Returns the value of an attribute if present
sourcepub fn has_attribute<A>(&self, attr: A) -> boolwhere
A: Into<Attribute>,
pub fn has_attribute<A>(&self, attr: A) -> boolwhere A: Into<Attribute>,
Returns true if the node has a specific attribute
Trait Implementations§
source§impl GetAttributes for Port
impl GetAttributes for Port
source§fn get_attributes(&self) -> &Attributes
fn get_attributes(&self) -> &Attributes
Returns an
Attributes instancesource§fn get_mut_attributes(&mut self) -> &mut Attributes
fn get_mut_attributes(&mut self) -> &mut Attributes
Returns a mutable
Attributes instancesource§impl PartialEq<Port> for Port
impl PartialEq<Port> for Port
impl Eq for Port
Auto Trait Implementations§
impl !RefUnwindSafe for Port
impl !Send for Port
impl !Sync for Port
impl Unpin for Port
impl !UnwindSafe for Port
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.