pub fn clear_ports(&mut self, sub_id: Option<&String>) {
    match sub_id {
      Some(sid) => match self.subscriptions.get_mut(sid) {
        Some(sub) => {
          sub.ports.clear();
        }
        None => {}
      },
      None => {
        for (_, sub) in self.subscriptions.iter_mut() {
          sub.ports.clear();
        }
      }
    }
  }
/// Remove all ports from a single subscription or all subscriptions
Remove all ports from a single subscription or all subscriptions
Remove all ports from a single subscription or all subscriptions
pub fn clear_ports(&mut self, sub_id: Option<&String>) {
    match sub_id {
      Some(sid) => match self.subscriptions.get_mut(sid) {
        Some(sub) => {
          sub.ports.clear();
        }
        None => {}
      },
      None => {
        for (_, sub) in self.subscriptions.iter_mut() {
          sub.ports.clear();
        }
      }
    }
  }
pub fn clear_ports ( & mut self , sub_id : Option < & String > ) { match sub_id { Some ( sid ) => match self . subscriptions . get_mut ( sid ) { Some ( sub ) => { sub . ports . clear ( ) ; } None => { } } , None => { for ( _ , sub ) in self . subscriptions . iter_mut ( ) { sub . ports . clear ( ) ; } } } }
Remove all ports from a single subscription or all subscriptions
Remove all ports from a single subscription or all subscriptions
&mut self
sub_id
Option<&String>
&mut self
sub_id
Option<&String>