pub fn teardown(&mut self) -> impl Future<Output = Result<(), String>> {
    if let Some(instance) = self.instance.take() {
      let sender = self.teardown_mpsc.0.clone();
      // When the MultiProgress completes, the Term(Destination) is dropped, which will restore
      // direct access to the Console.
      instance
        .multi_progress_task
        .map_err(|e| format!("Failed to render UI: {}", e))
        .and_then(move |()| {
          sender.send(()).unwrap();
          future::ok(())
        })
        .boxed()
    } else {
      future::ok(()).boxed()
    }
  }
///
/// If the ConsoleUI is running, completes it.
///
If the ConsoleUI is running, completes it.
If the ConsoleUI is running completes it .
pub fn teardown(&mut self) -> impl Future<Output = Result<(), String>> {
    if let Some(instance) = self.instance.take() {
      let sender = self.teardown_mpsc.0.clone();
      // When the MultiProgress completes, the Term(Destination) is dropped, which will restore
      // direct access to the Console.
      instance
        .multi_progress_task
        .map_err(|e| format!("Failed to render UI: {}", e))
        .and_then(move |()| {
          sender.send(()).unwrap();
          future::ok(())
        })
        .boxed()
    } else {
      future::ok(()).boxed()
    }
  }
pub fn teardown ( & mut self ) -> impl Future < Output = Result < ( ) , String > > { if let Some ( instance ) = self . instance . take ( ) { let sender = self . teardown_mpsc . 0 . clone ( ) ; // When the MultiProgress completes, the Term(Destination) is dropped, which will restore // direct access to the Console. instance . multi_progress_task . map_err ( | e | format ! ( " " e ) ) . and_then ( move | ( ) | { sender . send ( ( ) ) . unwrap ( ) ; future :: ok ( ( ) ) } ) . boxed ( ) } else { future :: ok ( ( ) ) . boxed ( ) } }
If the ConsoleUI is running, completes it.
If the ConsoleUI is running completes it .
&mut self
&mut self