pub struct ProgressBar {Show 13 fields
pub pos_x: usize,
pub pos_y: usize,
pub width: usize,
pub height: usize,
pub track_color: Color,
pub fill_color: Color,
pub border_color: Color,
pub border_size: usize,
pub radius: usize,
pub label: Option<Text>,
pub label_size: f32,
pub label_color: Color,
pub show_percentage: bool,
/* private fields */
}Fields§
§pos_x: usize§pos_y: usize§width: usize§height: usize§track_color: Color§fill_color: Color§border_color: Color§border_size: usize§radius: usize§label: Option<Text>§label_size: f32§label_color: Color§show_percentage: boolImplementations§
Source§impl ProgressBar
impl ProgressBar
pub fn position(self, x: usize, y: usize) -> Self
pub fn size(self, width: usize, height: usize) -> Self
pub fn default_progress(self, p: f32) -> Self
pub fn track_color(self, color: Color) -> Self
pub fn fill_color(self, color: Color) -> Self
pub fn border_color(self, color: Color) -> Self
pub fn border(self, size: usize) -> Self
pub fn radius(self, radius: usize) -> Self
pub fn show_percentage(self, show: bool) -> Self
pub fn label(self, text: &str, font: Font, size: f32) -> Self
pub fn label_color(self, color: Color) -> Self
pub fn progress(&self) -> f32
pub fn set_progress(&mut self, p: f32)
pub fn draw(&mut self, window: &mut Window)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProgressBar
impl RefUnwindSafe for ProgressBar
impl Send for ProgressBar
impl Sync for ProgressBar
impl Unpin for ProgressBar
impl UnsafeUnpin 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