pub async fn cleanup(&self) -> Result<(), Error> {
        task::block_in_place(|| crossterm::terminal::disable_raw_mode())
            .map_err(Error::from_crossterm)?;
        let mut buf = String::new();
        write!(buf, "{}", crossterm::cursor::Show)?;
        restore_screen(&mut buf)?;
        self.stdout.write_and_flush(buf.as_bytes()).await?;
        self.cleanedup.store(true, Release);
        Ok(())
    }
/// Asynchronous cleanup. It is preferred to call this before dropping.
Asynchronous cleanup. It is preferred to call this before dropping.
Asynchronous cleanup . It is preferred to call this before dropping .
pub async fn cleanup(&self) -> Result<(), Error> {
        task::block_in_place(|| crossterm::terminal::disable_raw_mode())
            .map_err(Error::from_crossterm)?;
        let mut buf = String::new();
        write!(buf, "{}", crossterm::cursor::Show)?;
        restore_screen(&mut buf)?;
        self.stdout.write_and_flush(buf.as_bytes()).await?;
        self.cleanedup.store(true, Release);
        Ok(())
    }
pub async fn cleanup ( & self ) -> Result < ( ) , Error > { task :: block_in_place ( | | crossterm :: terminal :: disable_raw_mode ( ) ) . map_err ( Error :: from_crossterm ) ? ; let mut buf = String :: new ( ) ; write ! ( buf " " crossterm cursor Show ) ? ; restore_screen ( & mut buf ) ? ; self . stdout . write_and_flush ( buf . as_bytes ( ) ) . await ? ; self . cleanedup . store ( true , Release ) ; Ok ( ( ) ) }
Asynchronous cleanup.
Asynchronous cleanup .
&self
&self