pub struct StatusPill { /* private fields */ }Expand description
A capsule-shaped row of (label, state) status items.
ui.add(
StatusPill::new()
.item("UI", IndicatorState::On)
.item("API", IndicatorState::Connecting)
.item("DB", IndicatorState::Off),
);Implementations§
Source§impl StatusPill
impl StatusPill
Sourcepub fn new() -> Self
pub fn new() -> Self
Create an empty status pill. Add rows with StatusPill::item.
Sourcepub fn item(self, label: impl Into<WidgetText>, state: IndicatorState) -> Self
pub fn item(self, label: impl Into<WidgetText>, state: IndicatorState) -> Self
Append a (label, state) row to the pill.
Trait Implementations§
Source§impl Debug for StatusPill
impl Debug for StatusPill
Source§impl Default for StatusPill
impl Default for StatusPill
Source§fn default() -> StatusPill
fn default() -> StatusPill
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StatusPill
impl RefUnwindSafe for StatusPill
impl Send for StatusPill
impl Sync for StatusPill
impl Unpin for StatusPill
impl UnsafeUnpin for StatusPill
impl UnwindSafe for StatusPill
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