pub struct TableCell { /* private fields */ }Expand description
Cell content and optional alignment override.
A missing override inherits its TableColumn alignment. Extra row cells
beyond the column count are ignored; missing cells leave blank columns.
§Examples
use ailloli_ui_widgets::controls::{TableAlign, TableCell};
let cell = TableCell::text("42").align(TableAlign::End);
let _ = cell;Implementations§
Source§impl TableCell
impl TableCell
Sourcepub fn text(label: impl Into<String>) -> Self
pub fn text(label: impl Into<String>) -> Self
Creates a primary-text cell.
§Examples
use ailloli_ui_widgets::controls::TableCell;
let cell = TableCell::text("Ready");
let _ = cell;Sourcepub fn muted(label: impl Into<String>) -> Self
pub fn muted(label: impl Into<String>) -> Self
Creates a muted-text cell.
§Examples
use ailloli_ui_widgets::controls::TableCell;
let cell = TableCell::muted("Optional");
let _ = cell;Sourcepub fn badge(label: impl Into<String>, tone: BadgeTone) -> Self
pub fn badge(label: impl Into<String>, tone: BadgeTone) -> Self
Creates a semantic-tone badge cell.
§Examples
use ailloli_ui_widgets::controls::{BadgeTone, TableCell};
let cell = TableCell::badge("Healthy", BadgeTone::Success);
let _ = cell;Sourcepub fn progress(value: f32) -> Self
pub fn progress(value: f32) -> Self
Creates an unlabeled progress cell.
Finite values are clamped to 0.0..=1.0 during paint; NaN paints only
the track because the computed fill is not positive.
§Examples
use ailloli_ui_widgets::controls::TableCell;
let cell = TableCell::progress(0.75);
let _ = cell;Sourcepub fn align(self, align: TableAlign) -> Self
pub fn align(self, align: TableAlign) -> Self
Overrides the owning column’s alignment for this cell.
§Examples
use ailloli_ui_widgets::controls::{TableAlign, TableCell};
let cell = TableCell::text("Centered").align(TableAlign::Center);
let _ = cell;Trait Implementations§
impl StructuralPartialEq for TableCell
Auto Trait Implementations§
impl Freeze for TableCell
impl RefUnwindSafe for TableCell
impl Send for TableCell
impl Sync for TableCell
impl Unpin for TableCell
impl UnwindSafe for TableCell
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.