pub fn shutdown_mock_server_by_port(&mut self, port: u16) -> bool {
        debug!("Shutting down mock server with port {}", port);
        let result = self.mock_servers.iter()
            .find(|ms| ms.1.addr.port() == port)
            .map(|ms| ms.1.id.clone());

        if let Some(id) = result {
            if let Some(mut mock_server) = self.mock_servers.remove(&id) {
                return match mock_server.shutdown() {
                    Ok(()) => true,
                    Err(_) => false
                }
            }
        }

        false
    }
/// Shut down a server by its local port number
Shut down a server by its local port number
Shut down a server by its local port number
pub fn shutdown_mock_server_by_port(&mut self, port: u16) -> bool {
        debug!("Shutting down mock server with port {}", port);
        let result = self.mock_servers.iter()
            .find(|ms| ms.1.addr.port() == port)
            .map(|ms| ms.1.id.clone());
        if let Some(id) = result {
            if let Some(mut mock_server) = self.mock_servers.remove(&id) {
                return match mock_server.shutdown() {
                    Ok(()) => true,
                    Err(_) => false
                }
            }
        }
        false
    }
pub fn shutdown_mock_server_by_port ( & mut self , port : u16 ) -> bool { debug ! ( " " port ) ; let result = self . mock_servers . iter ( ) . find ( | ms | ms . 1 . addr . port ( ) == port ) . map ( | ms | ms . 1 . id . clone ( ) ) ; if let Some ( id ) = result { if let Some ( mut mock_server ) = self . mock_servers . remove ( & id ) { return match mock_server . shutdown ( ) { Ok ( ( ) ) => true , Err ( _ ) => false } } } false }
Shut down a server by its local port number
Shut down a server by its local port number
&mut self
port
u16
&mut self
port
u16