pub struct ProgressBar { /* private fields */ }Expand description
A horizontal progress bar widget.
Implementations§
Source§impl ProgressBar
impl ProgressBar
Sourcepub const fn with_config(bounds: Rect, config: ProgressBarConfig) -> Self
pub const fn with_config(bounds: Rect, config: ProgressBarConfig) -> Self
Create a new progress bar with custom configuration.
Sourcepub const fn set_progress(&mut self, progress: f32)
pub const fn set_progress(&mut self, progress: f32)
Set the progress value (clamped to 0.0-1.0).
Sourcepub fn clear_label(&mut self)
pub fn clear_label(&mut self)
Clear the label.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if progress is complete (>= 1.0).
Trait Implementations§
Source§impl Debug for ProgressBar
impl Debug for ProgressBar
Source§impl Widget for ProgressBar
impl Widget for ProgressBar
Source§fn set_bounds(&mut self, bounds: Rect)
fn set_bounds(&mut self, bounds: Rect)
Set the bounds of this widget. Read more
Source§fn handle_input(&mut self, _event: &InputEvent) -> bool
fn handle_input(&mut self, _event: &InputEvent) -> bool
Handle an input event. Read more
Source§fn needs_redraw(&self) -> bool
fn needs_redraw(&self) -> bool
Check if this widget needs to be redrawn.
Source§fn clear_redraw(&mut self)
fn clear_redraw(&mut self)
Clear the redraw flag after rendering.
Auto Trait Implementations§
impl Freeze for ProgressBar
impl RefUnwindSafe for ProgressBar
impl Send for ProgressBar
impl Sync for ProgressBar
impl Unpin for ProgressBar
impl UnwindSafe for ProgressBar
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
Mutably borrows from an owned value. Read more