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 moreAuto Trait Implementations§
impl Freeze for TickSettings
impl RefUnwindSafe for TickSettings
impl Send for TickSettings
impl Sync for TickSettings
impl Unpin for TickSettings
impl UnwindSafe for TickSettings
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)