pub fn remove_port(&self, port: PortId) -> Result<Arc<OpaquePort>, Error> {
        self.ports
            .write()
            .unwrap()
            .remove(&port)
            .ok_or(Error::InvalidPort)
    }
/// Remove a port by ID.
Remove a port by ID.
Remove a port by ID .
pub fn remove_port(&self, port: PortId) -> Result<Arc<OpaquePort>, Error> {
        self.ports
            .write()
            .unwrap()
            .remove(&port)
            .ok_or(Error::InvalidPort)
    }
pub fn remove_port ( & self , port : PortId ) -> Result < Arc < OpaquePort > , Error > { self . ports . write ( ) . unwrap ( ) . remove ( & port ) . ok_or ( Error :: InvalidPort ) }
Remove a port by ID.
Remove a port by ID .
&self
port
PortId
&self
port
PortId