async fn handle_listener(
        &self,
        log_listener: ClientEnd<LogListenerSafeMarker>,
        options: Option<Box<LogFilterOptions>>,
        dump_logs: bool,
    ) -> Result<(), Error> {
        let mut listener = Listener::new(log_listener, options)?;

        let mut inner = self.inner.lock().await;
        listener.backfill(inner.log_msg_buffer.iter()).await;

        if !listener.is_healthy() {
            eprintln!("listener dropped before we finished");
            return Ok(());
        }

        if dump_logs {
            listener.done();
        } else {
            inner.listeners.add(listener);
        }
        Ok(())
    }
/// Handle a new listener, sending it all cached messages and either calling `Done` if
/// `dump_logs` is true or adding it to the pool of ongoing listeners if not.
Handle a new listener, sending it all cached messages and either calling `Done` if
`dump_logs` is true or adding it to the pool of ongoing listeners if not.
Handle a new listener sending it all cached messages and either calling ` Done ` if ` dump_logs ` is true or adding it to the pool of ongoing listeners if not .
async fn handle_listener(
        &self,
        log_listener: ClientEnd<LogListenerSafeMarker>,
        options: Option<Box<LogFilterOptions>>,
        dump_logs: bool,
    ) -> Result<(), Error> {
        let mut listener = Listener::new(log_listener, options)?;
        let mut inner = self.inner.lock().await;
        listener.backfill(inner.log_msg_buffer.iter()).await;
        if !listener.is_healthy() {
            eprintln!("listener dropped before we finished");
            return Ok(());
        }
        if dump_logs {
            listener.done();
        } else {
            inner.listeners.add(listener);
        }
        Ok(())
    }
async fn handle_listener ( & self , log_listener : ClientEnd < LogListenerSafeMarker > , options : Option < Box < LogFilterOptions > > , dump_logs : bool , ) -> Result < ( ) , Error > { let mut listener = Listener :: new ( log_listener , options ) ? ; let mut inner = self . inner . lock ( ) . await ; listener . backfill ( inner . log_msg_buffer . iter ( ) ) . await ; if ! listener . is_healthy ( ) { eprintln ! ( " " ) ; return Ok ( ( ) ) ; } if dump_logs { listener . done ( ) ; } else { inner . listeners . add ( listener ) ; } Ok ( ( ) ) }
Handle a new listener, sending it all cached messages and either calling `Done` if
`dump_logs` is true or adding it to the pool of ongoing listeners if not.
Handle a new listener sending it all cached messages and either calling ` Done ` if ` dump_logs ` is true or adding it to the pool of ongoing listeners if not .
&self
log_listener
ClientEnd<LogListenerSafeMarker>
options
Option<Box<LogFilterOptions>>
dump_logs
bool
&self
log_listener
ClientEnd<LogListenerSafeMarker>
options
Option<Box<LogFilterOptions>>
dump_logs
bool