Enum bitsy_lang::Component
source · pub enum Component {
Mod(Span, Name, Vec<Arc<Component>>, Vec<Wire>, Vec<When>),
ModInst(Span, Name, Arc<Component>),
Ext(Span, Name, Vec<Arc<Component>>),
Dom(Span, Name),
Incoming(Span, Name, Type),
Outgoing(Span, Name, Type),
Node(Span, Name, Type),
Reg(Span, Name, Type, Option<Arc<Expr>>),
}
Expand description
A Component
is a declaration that lives inside of a mod
or ext
definiton.
Variants§
Mod(Span, Name, Vec<Arc<Component>>, Vec<Wire>, Vec<When>)
ModInst(Span, Name, Arc<Component>)
Ext(Span, Name, Vec<Arc<Component>>)
Dom(Span, Name)
Incoming(Span, Name, Type)
Outgoing(Span, Name, Type)
Node(Span, Name, Type)
Reg(Span, 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 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