pub struct StatPropsBuilder<__label = label, __value = value> { /* private fields */ }Expand description
Typestate builder for StatProps, created by StatProps::builder(). build() becomes available once every required property has been set.
Implementations§
Source§impl<__label, __value> StatPropsBuilder<__label, __value>
impl<__label, __value> StatPropsBuilder<__label, __value>
Sourcepub fn label(self, label: impl Into<String>) -> StatPropsBuilder<Set, __value>
pub fn label(self, label: impl Into<String>) -> StatPropsBuilder<Set, __value>
What the value counts, e.g. "Posts".
Sourcepub fn value(self, value: impl Into<String>) -> StatPropsBuilder<__label, Set>
pub fn value(self, value: impl Into<String>) -> StatPropsBuilder<__label, Set>
The figure, formatted, e.g. "1,204" or "98%".
Sourcepub fn detail(self, detail: impl Into<String>) -> Self
pub fn detail(self, detail: impl Into<String>) -> Self
Optional line under the value, e.g. "12 this week".
Sourcepub fn detail_icon(self, detail_icon: impl Into<Option<IconData>>) -> Self
pub fn detail_icon(self, detail_icon: impl Into<Option<IconData>>) -> Self
Optional icon before the detail line, such as an arrow for its trend.
Sourcepub fn detail_icon_label(self, detail_icon_label: impl Into<String>) -> Self
pub fn detail_icon_label(self, detail_icon_label: impl Into<String>) -> Self
What the detail icon says to a screen reader, e.g. "Up"; the icon alone is hidden from
it.
Sourcepub fn accent(self, accent: impl Into<String>) -> Self
pub fn accent(self, accent: impl Into<String>) -> Self
The text-color class of the detail line and the chart, e.g. "text-success"; muted when
empty.
Auto Trait Implementations§
impl<__label = label, __value = value> !RefUnwindSafe for StatPropsBuilder<__label, __value>
impl<__label = label, __value = value> !UnwindSafe for StatPropsBuilder<__label, __value>
impl<__label, __value> Freeze for StatPropsBuilder<__label, __value>
impl<__label, __value> Send for StatPropsBuilder<__label, __value>
impl<__label, __value> Sync for StatPropsBuilder<__label, __value>
impl<__label, __value> Unpin for StatPropsBuilder<__label, __value>
impl<__label, __value> UnsafeUnpin for StatPropsBuilder<__label, __value>
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