pub fn handle_tui(info: Option<Info>) -> Result<()> {
    let mut root = cursive::default();
    // Theme
    let theme = theme(&mut root);
    root.set_theme(theme);

    // User entry point
    if info.is_none() {
        disks(&mut root);
    } else if let Some(_info) = info {
        todo!("Parts")
        // parts(&mut root, &info);
    }

    // Global hotkeys
    root.add_global_callback('q', |s| s.quit());
    root.add_global_callback(Event::CtrlChar('d'), |s| s.toggle_debug_console());
    root.add_global_callback('h', |_| todo!("Help menu"));

    root.run();
    Ok(())
}
/// Handle the TUI interface.
///
/// This function doesn't return until the user exits.
Handle the TUI interface.
This function doesn't return until the user exits.
Handle the TUI interface . This function doesn ' t return until the user exits .
pub fn handle_tui(info: Option<Info>) -> Result<()> {
    let mut root = cursive::default();
    // Theme
    let theme = theme(&mut root);
    root.set_theme(theme);
    // User entry point
    if info.is_none() {
        disks(&mut root);
    } else if let Some(_info) = info {
        todo!("Parts")
        // parts(&mut root, &info);
    }
    // Global hotkeys
    root.add_global_callback('q', |s| s.quit());
    root.add_global_callback(Event::CtrlChar('d'), |s| s.toggle_debug_console());
    root.add_global_callback('h', |_| todo!("Help menu"));
    root.run();
    Ok(())
}
pub fn handle_tui ( info : Option < Info > ) -> Result < ( ) > { let mut root = cursive :: default ( ) ; // Theme let theme = theme ( & mut root ) ; root . set_theme ( theme ) ; // User entry point if info . is_none ( ) { disks ( & mut root ) ; } else if let Some ( _info ) = info { todo ! ( " " ) // parts(&mut root, &info); } // Global hotkeys root . add_global_callback ( 'q' , | s | s . quit ( ) ) ; root . add_global_callback ( Event :: CtrlChar ( 'd' ) , | s | s . toggle_debug_console ( ) ) ; root . add_global_callback ( 'h' , | _ | todo ! ( " " ) ) ; root . run ( ) ; Ok ( ( ) ) }
Handle the TUI interface.
Handle the TUI interface .
info
Option<Info>
info
Option<Info>