pub fn remove_port(&mut self, sub_id: &String, port_name: &String) -> Result<()> {
    match self.subscriptions.get_mut(sub_id) {
      Some(sub) => {
        sub.ports.retain(|p| p != port_name);
        Ok(())
      }
      None => Err(ErrorKind::SubscriptionNotFound(sub_id.to_string()).into()),
    }
  }
/// Remove a single port from a given subscription or all subscriptions
Remove a single port from a given subscription or all subscriptions
Remove a single port from a given subscription or all subscriptions
pub fn remove_port(&mut self, sub_id: &String, port_name: &String) -> Result<()> {
    match self.subscriptions.get_mut(sub_id) {
      Some(sub) => {
        sub.ports.retain(|p| p != port_name);
        Ok(())
      }
      None => Err(ErrorKind::SubscriptionNotFound(sub_id.to_string()).into()),
    }
  }
pub fn remove_port ( & mut self , sub_id : & String , port_name : & String ) -> Result < ( ) > { match self . subscriptions . get_mut ( sub_id ) { Some ( sub ) => { sub . ports . retain ( | p | p != port_name ) ; Ok ( ( ) ) } None => Err ( ErrorKind :: SubscriptionNotFound ( sub_id . to_string ( ) ) . into ( ) ) , } }
Remove a single port from a given subscription or all subscriptions
Remove a single port from a given subscription or all subscriptions
&mut self
sub_id
&String
port_name
&String
&mut self
sub_id
&String
port_name
&String