pub struct Digits { /* private fields */ }Expand description
Large digit display widget
Implementations§
Source§impl Digits
impl Digits
Sourcepub fn from_float(value: f64, decimals: usize) -> Self
pub fn from_float(value: f64, decimals: usize) -> Self
Create from float with decimal places
Sourcepub fn style(self, style: DigitStyle) -> Self
pub fn style(self, style: DigitStyle) -> Self
Set display style
Sourcepub fn leading_zeros(self, show: bool) -> Self
pub fn leading_zeros(self, show: bool) -> Self
Show leading zeros
Sourcepub fn digit_width(&self) -> usize
pub fn digit_width(&self) -> usize
Get the width of a single digit in this style
Sourcepub fn render_lines(&self) -> Vec<String>
pub fn render_lines(&self) -> Vec<String>
Render to lines
Trait Implementations§
Source§impl StyledView for Digits
impl StyledView for Digits
Source§fn remove_class(&mut self, class: &str)
fn remove_class(&mut self, class: &str)
Remove a CSS class
Source§fn toggle_class(&mut self, class: &str)
fn toggle_class(&mut self, class: &str)
Toggle a CSS class
Auto Trait Implementations§
impl Freeze for Digits
impl RefUnwindSafe for Digits
impl Send for Digits
impl Sync for Digits
impl Unpin for Digits
impl UnwindSafe for Digits
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