pub fn run(&mut self) -> () {
        let listeners = &mut self.listeners;
        let servers = &mut self.servers;

        // TODO: add dummy objects to servers

        self.conn.iter().fold((), |_, mut message| {
            if let MessageType::Signal = message.message_type() {
                for listener in listeners.iter_mut() {
                    listener.handle_message(&mut message);
                }
            }

            servers.iter_mut().fold(Some(&mut message), |opt_m, (_, server)| {
                opt_m.and_then(|m| server.handle_message(m))
            });
        });
    }
// FIXME: Allow this to hook into other event loops.
/// Run an event loop to handle messages.
Allow this to hook into other event loops.
Run an event loop to handle messages.
Allow this to hook into other event loops . Run an event loop to handle messages .
pub fn run(&mut self) -> () {
        let listeners = &mut self.listeners;
        let servers = &mut self.servers;
        // TODO: add dummy objects to servers
        self.conn.iter().fold((), |_, mut message| {
            if let MessageType::Signal = message.message_type() {
                for listener in listeners.iter_mut() {
                    listener.handle_message(&mut message);
                }
            }
            servers.iter_mut().fold(Some(&mut message), |opt_m, (_, server)| {
                opt_m.and_then(|m| server.handle_message(m))
            });
        });
    }
pub fn run ( & mut self ) -> ( ) { let listeners = & mut self . listeners ; let servers = & mut self . servers ; // TODO: add dummy objects to servers self . conn . iter ( ) . fold ( ( ) , | _ , mut message | { if let MessageType :: Signal = message . message_type ( ) { for listener in listeners . iter_mut ( ) { listener . handle_message ( & mut message ) ; } } servers . iter_mut ( ) . fold ( Some ( & mut message ) , | opt_m , ( _ , server ) | { opt_m . and_then ( | m | server . handle_message ( m ) ) } ) ; } ) ; }
FIXME: Allow this to hook into other event loops.
FIXME : Allow this to hook into other event loops .
&mut self