Skip to content

Nutmeg 0.1.0

Compare
Choose a tag to compare
@sourcefrog sourcefrog released this 23 Mar 04:58
· 36 commits to main since this release
v0.1.0
  • API change: The Write type representing the destination is no longer part of the visible public signature of View, to hide complexity and since it is not helpful to most callers.

  • API change: Renamed View::to_stderr to View::new_stderr.

  • New: percent_done and estimate_remaining functions to help in rendering progress bars.

  • New: The models mod provides some generally-useful basic models, specifically models::StringPair, models::UnboundedModel and models::LinearModel. These build only on the public interface of Nutmeg, so also constitute examples of what can be done in application-defined models.

  • New: View::finish removes the progress bar (if painted) and returns the Model. View::abandon now also returns the model.

  • New: Model::final_message to let the model render a message to be printed when work is complete.

  • New: The callback to View::update may return a value, and this is passed back to the caller of View::update.

  • New: models::BasicModel allows simple cases to supply both an initial value and a render function inline in the View constructor call, avoiding any need to define a Model struct.

  • New: View::inspect_model gives its callback a &mut to the model.

  • New: Progress bars constructed by View::new and View::new_stderr are disabled when $TERM=dumb.