pub struct Cell {
pub content: String,
pub style: Option<CellStyle>,
pub colspan: usize,
pub rowspan: usize,
pub text_wrap: bool,
pub images: Vec<CellImage>,
}Expand description
Represents a cell in a table
Fields§
§content: String§style: Option<CellStyle>§colspan: usize§rowspan: usize§text_wrap: boolEnable text wrapping for this cell
images: Vec<CellImage>Image payloads for this cell (rendered side-by-side when multiple).
Implementations§
Source§impl Cell
impl Cell
Sourcepub fn from_image(image: CellImage) -> Self
pub fn from_image(image: CellImage) -> Self
Create a cell containing a single image (with empty text).
Sourcepub fn from_images(images: Vec<CellImage>) -> Self
pub fn from_images(images: Vec<CellImage>) -> Self
Create a cell containing multiple images rendered side-by-side (with empty text).
Sourcepub fn with_image(self, image: CellImage) -> Self
pub fn with_image(self, image: CellImage) -> Self
Set a single image payload for this cell (replaces any existing images).
Sourcepub fn with_style(self, style: CellStyle) -> Self
pub fn with_style(self, style: CellStyle) -> Self
Set cell style
Sourcepub fn with_colspan(self, span: usize) -> Self
pub fn with_colspan(self, span: usize) -> Self
Set colspan
Sourcepub fn with_rowspan(self, span: usize) -> Self
pub fn with_rowspan(self, span: usize) -> Self
Set rowspan
Sourcepub fn with_font_size(self, size: f32) -> Self
pub fn with_font_size(self, size: f32) -> Self
Set font size
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cell
impl RefUnwindSafe for Cell
impl Send for Cell
impl Sync for Cell
impl Unpin for Cell
impl UnsafeUnpin for Cell
impl UnwindSafe for Cell
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more