pub enum Component {
Mod(Loc, Name, Vec<Arc<Component>>, Vec<Wire>, Vec<When>),
ModInst(Loc, Name, Arc<Component>),
Ext(Loc, Name, Vec<Arc<Component>>),
Incoming(Loc, Name, Type),
Outgoing(Loc, Name, Type),
Node(Loc, Name, Type),
Reg(Loc, Name, Type, Option<Arc<Expr>>),
}
Expand description
A Component
is a declaration that lives inside of a mod
or ext
definiton.
Variants§
Mod(Loc, Name, Vec<Arc<Component>>, Vec<Wire>, Vec<When>)
ModInst(Loc, Name, Arc<Component>)
Ext(Loc, Name, Vec<Arc<Component>>)
Incoming(Loc, Name, Type)
Outgoing(Loc, Name, Type)
Node(Loc, Name, Type)
Reg(Loc, Name, Type, Option<Arc<Expr>>)
Implementations§
Source§impl Component
impl Component
pub fn name(&self) -> &str
pub fn child(&self, name: &str) -> Option<Arc<Component>>
pub fn children(&self) -> Vec<Arc<Component>>
pub fn port_paths(&self) -> Vec<(Path, Arc<Component>)>
pub fn is_mod(&self) -> bool
pub fn is_port(&self) -> bool
pub fn is_incoming_port(&self) -> bool
pub fn is_outgoing_port(&self) -> bool
pub fn type_of(&self) -> Option<Type>
pub fn reset(&self) -> Option<Arc<Expr>>
pub fn submods(&self) -> Vec<Arc<Component>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Component
impl RefUnwindSafe for Component
impl Send for Component
impl Sync for Component
impl Unpin for Component
impl UnwindSafe for Component
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