Manage a console/terminal UI that can alternate between showing a progress bar and lines of text output.
By contrast to other Rust progress-bar libraries, Nutmeg has no built-in concept of what the progress bar or indicator should look like: this is entirely under the control of the application. Nutmeg handles drawing the application's progress bar to the screen and removing it as needed.
The application (or dependent library) is responsible for:
String
for the progress
representation, optionally including ANSI styling.writeln!(view, "hello")
rather than println!("hello")
.The Nutmeg library is responsible for:
Errors in writing to the terminal cause a panic.
Draw updates from a background thread, so that it will keep ticking even if not actively updated, and to better handle applications that send a burst of updates followed by a long pause. The background thread will eventually paint the last drawn update.
Also set the window title from the progress model, perhaps by a different render function?
License: MIT