pub fn add_input(
        &mut self,
        portdef: impl Into<ast::Portdef>,
    ) -> Result<()> {
        let portdef = portdef.into();
        if !self.signature.has_input(portdef.name.as_ref()) {
            self.structure.insert_input_port(&portdef);
            self.signature.inputs.push(portdef);
            Ok(())
        } else {
            Err(Error::DuplicatePort(self.name.clone(), portdef))
        }
    }
/// Add a new input port to this component.
Add a new input port to this component.
Add a new input port to this component .
pub fn add_input(
        &mut self,
        portdef: impl Into<ast::Portdef>,
    ) -> Result<()> {
        let portdef = portdef.into();
        if !self.signature.has_input(portdef.name.as_ref()) {
            self.structure.insert_input_port(&portdef);
            self.signature.inputs.push(portdef);
            Ok(())
        } else {
            Err(Error::DuplicatePort(self.name.clone(), portdef))
        }
    }
pub fn add_input ( & mut self , portdef : impl Into < ast :: Portdef > , ) -> Result < ( ) > { let portdef = portdef . into ( ) ; if ! self . signature . has_input ( portdef . name . as_ref ( ) ) { self . structure . insert_input_port ( & portdef ) ; self . signature . inputs . push ( portdef ) ; Ok ( ( ) ) } else { Err ( Error :: DuplicatePort ( self . name . clone ( ) , portdef ) ) } }
Add a new input port to this component.
Add a new input port to this component .
&mut self
portdef
impl Into<ast::Portdef>