pub fn initialize(&mut self, executor: Executor) -> Result<(), String> {
    if self.instance.is_some() {
      return Err("A ConsoleUI cannot render multiple UIs concurrently.".to_string());
    }

    // Setup bars (which will take ownership of the current Console), and then spawn rendering
    // of the bars into a background task.
    let (bars, multi_progress_task) = self.setup_bars(executor)?;

    self.instance = Some(Instance {
      tasks_to_display: IndexMap::new(),
      multi_progress_task,
      bars,
    });
    Ok(())
  }
///
/// If the ConsoleUI is not already running, starts it.
///
/// Errors if a ConsoleUI is already running (which would likely indicate concurrent usage of a
/// Session attached to a console).
///
If the ConsoleUI is not already running, starts it.
Errors if a ConsoleUI is already running (which would likely indicate concurrent usage of a
Session attached to a console).
If the ConsoleUI is not already running starts it . Errors if a ConsoleUI is already running ( which would likely indicate concurrent usage of a Session attached to a console ) .
pub fn initialize(&mut self, executor: Executor) -> Result<(), String> {
    if self.instance.is_some() {
      return Err("A ConsoleUI cannot render multiple UIs concurrently.".to_string());
    }
    // Setup bars (which will take ownership of the current Console), and then spawn rendering
    // of the bars into a background task.
    let (bars, multi_progress_task) = self.setup_bars(executor)?;
    self.instance = Some(Instance {
      tasks_to_display: IndexMap::new(),
      multi_progress_task,
      bars,
    });
    Ok(())
  }
pub fn initialize ( & mut self , executor : Executor ) -> Result < ( ) , String > { if self . instance . is_some ( ) { return Err ( " " . to_string ( ) ) ; } // Setup bars (which will take ownership of the current Console), and then spawn rendering // of the bars into a background task. let ( bars , multi_progress_task ) = self . setup_bars ( executor ) ? ; self . instance = Some ( Instance { tasks_to_display : IndexMap :: new ( ) , multi_progress_task , bars , } ) ; Ok ( ( ) ) }
If the ConsoleUI is not already running, starts it.
If the ConsoleUI is not already running starts it .
&mut self
executor
Executor
&mut self
executor
Executor