pub fn unlock_all_ports_for_sub(&mut self, sub_id: &String) {
    let mut to_delete = Vec::<String>::new();
    for port_name in self.write_locks.keys() {
      if self
        .write_locks
        .get(port_name)
        .map(|sid| sid == sub_id)
        .unwrap_or(false)
      {
        to_delete.push(port_name.to_string());
      }
    }
    for delete_port in to_delete.iter() {
      self.write_locks.remove(delete_port);
    }
  }
/// Release all write locks held by this sub_id
Release all write locks held by this sub_id
Release all write locks held by this sub_id
pub fn unlock_all_ports_for_sub(&mut self, sub_id: &String) {
    let mut to_delete = Vec::<String>::new();
    for port_name in self.write_locks.keys() {
      if self
        .write_locks
        .get(port_name)
        .map(|sid| sid == sub_id)
        .unwrap_or(false)
      {
        to_delete.push(port_name.to_string());
      }
    }
    for delete_port in to_delete.iter() {
      self.write_locks.remove(delete_port);
    }
  }
pub fn unlock_all_ports_for_sub ( & mut self , sub_id : & String ) { let mut to_delete = Vec :: < String > :: new ( ) ; for port_name in self . write_locks . keys ( ) { if self . write_locks . get ( port_name ) . map ( | sid | sid == sub_id ) . unwrap_or ( false ) { to_delete . push ( port_name . to_string ( ) ) ; } } for delete_port in to_delete . iter ( ) { self . write_locks . remove ( delete_port ) ; } }
Release all write locks held by this sub_id
Release all write locks held by this sub_id
&mut self
sub_id
&String
&mut self
sub_id
&String