Nutmeg 0.1.0
-
API change: The
Write
type representing the destination is no longer part of the visible public signature ofView
, to hide complexity and since it is not helpful to most callers. -
API change: Renamed
View::to_stderr
toView::new_stderr
. -
New:
percent_done
andestimate_remaining
functions to help in rendering progress bars. -
New: The
models
mod provides some generally-useful basic models, specificallymodels::StringPair
,models::UnboundedModel
andmodels::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 theModel
.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 ofView::update
. -
New:
models::BasicModel
allows simple cases to supply both an initial value and a render function inline in theView
constructor call, avoiding any need to define aModel
struct. -
New:
View::inspect_model
gives its callback a&mut
to the model. -
New: Progress bars constructed by
View::new
andView::new_stderr
are disabled when$TERM=dumb
.