You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: futures.rs
    path of file: ./repos/gloo/crates/net/src/eventsource
    
    the code of the file until where you have to start completion: //! A wrapper around the `EventSource` API using the Futures API to be used with async rust.
//!
//! EventSource is s
    
    fn close_and_notify(&mut self) {
        self.es.close();
        // Fire an error event to cause all subscriber
        // streams to close down.
        if let Ok(event) = web_sys::Event::new("error") {
            let _ = self.es.dispatch_event(&event);
        }
    }