pub struct TickSettings {
pub term_draw_hz: u8,
pub default_tick_interval: Option<Duration>,
pub footer_tick_interval: Option<Duration>,
/* private fields */
}
Expand description
Controls how often progress bars are recalculated and redrawn to the terminal.
This struct must be constructed as
TickSettings {
term_draw_hz: 20,
default_tick_interval: None,
footer_tick_interval: None,
..Default::default()
}
as to ensure forward compatibility.
Fields§
§term_draw_hz: u8
The rate at which to draw to the terminal.
A value of 20 here means indicatif will redraw the terminal state 20 times a second (i.e. once every 50ms).
default_tick_interval: Option<Duration>
The default interval to pass to enable_steady_tick
for a new progress bar. This controls
how often the progress bar state is recalculated. Defaults to
Some(Duration::from_millis(100))
.
Note, this does not control how often the progress bar is actually redrawn, that is
controlled by Self::term_draw_hz
.
Using None
here will disable steady ticks for your progress bars.
The interval to pass to enable_steady_tick
for the footer progress bar. This controls
how often the footer progress bar state is recalculated. Defaults to None
.
Note, this does not control how often the footer progress bar is actually redrawn, that is
controlled by Self::term_draw_hz
.
Using None
here will disable steady ticks for the footer progress bar. Unless you have a
spinner in your footer, you should set this to None
as we manually redraw the footer
whenever something changes.
Trait Implementations§
Source§impl Clone for TickSettings
impl Clone for TickSettings
Source§fn clone(&self) -> TickSettings
fn clone(&self) -> TickSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more