pub struct CircularProgress { /* private fields */ }Expand description
A ring that fills up.
let r = CircularProgress![value = 75.0, show_value = true, color = Color::Success];
let html = render_static(r);
assert!(html.contains("nr-ring") && html.contains("75%"));Implementations§
Source§impl CircularProgress
impl CircularProgress
pub fn new() -> Self
Sourcepub fn class(self, v: impl Into<String>) -> Self
pub fn class(self, v: impl Into<String>) -> Self
Extra classes for the outer element. They win over the defaults.
Sourcepub fn with(self, part: impl Part) -> Self
pub fn with(self, part: impl Part) -> Self
Add an attribute (class(..), id(..), aria(..), …) or a child.
Sourcepub fn value(self, v: f64) -> Self
pub fn value(self, v: f64) -> Self
The current value; none means indeterminate (a spinning arc).
pub fn color(self, v: Color) -> Self
pub fn size(self, v: Size) -> Self
Sourcepub fn label(self, v: impl Into<String>) -> Self
pub fn label(self, v: impl Into<String>) -> Self
Text under the ring (also its accessible name).
Sourcepub fn show_value(self, v: bool) -> Self
pub fn show_value(self, v: bool) -> Self
The percentage inside the ring.
Sourcepub fn value_label(self, v: impl Into<String>) -> Self
pub fn value_label(self, v: impl Into<String>) -> Self
Text inside the ring instead of the percentage.
Trait Implementations§
Source§impl Default for CircularProgress
impl Default for CircularProgress
Auto Trait Implementations§
impl !RefUnwindSafe for CircularProgress
impl !Sync for CircularProgress
impl !UnwindSafe for CircularProgress
impl Forget for CircularProgress
impl Freeze for CircularProgress
impl Move for CircularProgress
impl Send for CircularProgress
impl Unpin for CircularProgress
impl UnsafeUnpin for CircularProgress
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