Expand description
Text progress bar builtins backed by the indicatif crate.
R’s utils::txtProgressBar API lets scripts report progress for
long-running operations. This module stores progress bar state on the
Interpreter struct as a Vec<Option<ProgressBarState>> — each bar is
addressed by its index in this Vec. The R side sees an integer ID with
class "txtProgressBar".
Builtins:
txtProgressBar(min, max, style)— create a bar, return integer IDsetTxtProgressBar(pb, value)— update the bar’s positiongetTxtProgressBar(pb)— return the bar’s current valueclose(pb)— finish and remove the bar (dispatched from the connection-layerclose()when the argument has class"txtProgressBar")
Structs§
- Progress
BarState - Per-bar state stored on the interpreter.
Statics§
- __
INTERP_ 🔒REG_ INTERP_ GET_ TXT_ PROGRESS_ BAR - __
INTERP_ 🔒REG_ INTERP_ SET_ TXT_ PROGRESS_ BAR - __
INTERP_ 🔒REG_ INTERP_ TXT_ PROGRESS_ BAR
Functions§
- interp_
get_ 🔒txt_ progress_ bar - Get the current value of a text progress bar.
- interp_
set_ 🔒txt_ progress_ bar - Update a text progress bar’s position.
- interp_
txt_ 🔒progress_ bar - Create a text progress bar.
- is_
progress_ bar - Returns
trueifvalcarries the"txtProgressBar"class attribute. - progress_
bar_ 🔒id - Extract a progress bar ID from an argument that carries class
"txtProgressBar". - progress_
bar_ 🔒value - Build an integer scalar with class
"txtProgressBar"representing barid. - style_
for 🔒 - Build an indicatif
ProgressStylefor the given R style number. - value_
to_ 🔒position - Map an R-level value in
[min, max]to au64position in[0, total].