pub async fn done(self) -> Result<(), anyhow::Error> {
        // abort timer so that it is not fired in the future.
        self.timer.cancel().await;

        let mut inner = self.inner.lock().await;
        inner.flush().await?;
        inner.error.take().map_or_else(|| Ok(()), Err)
    }
/// This will abort the timer (if not already fired) and then flush all
/// the logs in buffer.
/// This function should be called before the object is dropped.
/// Returns error due flushing the logs.
This will abort the timer (if not already fired) and then flush all
the logs in buffer.
This function should be called before the object is dropped.
Returns error due flushing the logs.
This will abort the timer ( if not already fired ) and then flush all the logs in buffer . This function should be called before the object is dropped . Returns error due flushing the logs .
pub async fn done(self) -> Result<(), anyhow::Error> {
        // abort timer so that it is not fired in the future.
        self.timer.cancel().await;
        let mut inner = self.inner.lock().await;
        inner.flush().await?;
        inner.error.take().map_or_else(|| Ok(()), Err)
    }
pub async fn done ( self ) -> Result < ( ) , anyhow :: Error > { // abort timer so that it is not fired in the future. self . timer . cancel ( ) . await ; let mut inner = self . inner . lock ( ) . await ; inner . flush ( ) . await ? ; inner . error . take ( ) . map_or_else ( | | Ok ( ( ) ) , Err ) }
This will abort the timer (if not already fired) and then flush all
the logs in buffer.
This will abort the timer ( if not already fired ) and then flush all the logs in buffer .
self
self