pub fn send_messages_to(&self, sender_name: &UnitName, messages: Vec<ManagerStatusMessage>) {
        let mut deactivate_reason = None;
        match *sender_name.kind() {
            UnitKind::Interface => {
                let interface_table = self.interfaces.borrow();
                let interface = interface_table.get(sender_name).expect("Unable to find Interface in the library");
                for msg in messages {
                    if let Err(e) = interface.borrow().output_message(msg) {
                        deactivate_reason = Some(e);
                        break;
                    }
                }
            },
            _ => (),
        }
        if let Some(deactivate_reason) = deactivate_reason {
            self.deactivate(sender_name, format!("communication error: {}", deactivate_reason).as_str());
        }
    }
/// Send a Vec<ManagerStatusMessage> to a specific endpoint.

Send a Vec to a specific endpoint.
Send a Vec to a specific endpoint .
pub fn send_messages_to(&self, sender_name: &UnitName, messages: Vec<ManagerStatusMessage>) {
        let mut deactivate_reason = None;
        match *sender_name.kind() {
            UnitKind::Interface => {
                let interface_table = self.interfaces.borrow();
                let interface = interface_table.get(sender_name).expect("Unable to find Interface in the library");
                for msg in messages {
                    if let Err(e) = interface.borrow().output_message(msg) {
                        deactivate_reason = Some(e);
                        break;
                    }
                }
            },
            _ => (),
        }
        if let Some(deactivate_reason) = deactivate_reason {
            self.deactivate(sender_name, format!("communication error: {}", deactivate_reason).as_str());
        }
    }
pub fn send_messages_to ( & self , sender_name : & UnitName , messages : Vec < ManagerStatusMessage > ) { let mut deactivate_reason = None ; match * sender_name . kind ( ) { UnitKind :: Interface => { let interface_table = self . interfaces . borrow ( ) ; let interface = interface_table . get ( sender_name ) . expect ( " " ) ; for msg in messages { if let Err ( e ) = interface . borrow ( ) . output_message ( msg ) { deactivate_reason = Some ( e ) ; break ; } } } , _ => ( ) , } if let Some ( deactivate_reason ) = deactivate_reason { self . deactivate ( sender_name , format ! ( " " deactivate_reason ) . as_str ( ) ) ; } }
Send a Vec<ManagerStatusMessage> to a specific endpoint.
Send a Vec<ManagerStatusMessage > to a specific endpoint .
&self
sender_name
&UnitName
messages
Vec<ManagerStatusMessage>
&self
sender_name
&UnitName
messages
Vec<ManagerStatusMessage>