pub fn find_mock_server_by_port_mut<R>(&mut self, mock_server_port: u16, f: &dyn Fn(&mut MockServer) -> R) -> Option<R> {
        match self.mock_servers.iter_mut().find(|ms| ms.1.addr.port() == mock_server_port) {
            Some(mock_server) => {
                Some(f(mock_server.1))
            },
            None => None
        }
    }
/// Find a mock server by port number and apply a mutating operation on it if successful
Find a mock server by port number and apply a mutating operation on it if successful
Find a mock server by port number and apply a mutating operation on it if successful
pub fn find_mock_server_by_port_mut<R>(&mut self, mock_server_port: u16, f: &dyn Fn(&mut MockServer) -> R) -> Option<R> {
        match self.mock_servers.iter_mut().find(|ms| ms.1.addr.port() == mock_server_port) {
            Some(mock_server) => {
                Some(f(mock_server.1))
            },
            None => None
        }
    }
pub fn find_mock_server_by_port_mut < R > ( & mut self , mock_server_port : u16 , f : & dyn Fn ( & mut MockServer ) -> R ) -> Option < R > { match self . mock_servers . iter_mut ( ) . find ( | ms | ms . 1 . addr . port ( ) == mock_server_port ) { Some ( mock_server ) => { Some ( f ( mock_server . 1 ) ) } , None => None } }
Find a mock server by port number and apply a mutating operation on it if successful
Find a mock server by port number and apply a mutating operation on it if successful
&mut self
mock_server_port
u16
f
&dyn Fn(&mut MockServer) -> R
&mut self
mock_server_port
u16
f
&dyn Fn(&mut MockServer) -> R