demacroify io_header

This commit is contained in:
🪞👃🪞 2025-01-25 19:28:08 +01:00
parent a66a6a9669
commit 1fb5dfbe11
3 changed files with 57 additions and 47 deletions

View file

@ -13,7 +13,7 @@ macro_rules! impl_port {
}
impl AsRef<Port<$Spec>> for $Name { fn as_ref (&self) -> &Port<$Spec> { &self.port } }
impl $Name {
pub fn name (&self) -> &str { self.name.as_ref() }
pub fn name (&self) -> &Arc<str> { &self.name }
pub fn port (&self) -> &Port<$Spec> { &self.port }
pub fn port_mut (&mut self) -> &mut Port<$Spec> { &mut self.port }
pub fn new ($jack: &Jack, name: impl AsRef<str>, connect: &[PortConnect])