pub struct TableCell {Show 15 fields
pub text: String,
pub bold: bool,
pub italic: bool,
pub underline: bool,
pub text_color: Option<String>,
pub background_color: Option<String>,
pub font_size: Option<u32>,
pub font_family: Option<String>,
pub align: CellAlign,
pub valign: CellVAlign,
pub wrap_text: bool,
pub grid_span: Option<u32>,
pub row_span: Option<u32>,
pub h_merge: bool,
pub v_merge: bool,
}Expand description
Table cell content with formatting options
Fields§
§text: StringCell text content
bold: boolBold text
italic: boolItalic text
underline: boolUnderlined text
text_color: Option<String>Text color (RGB hex, e.g., “FF0000”)
background_color: Option<String>Background color (RGB hex, e.g., “0000FF”)
font_size: Option<u32>Font size in points
font_family: Option<String>Font family name
align: CellAlignHorizontal text alignment
valign: CellVAlignVertical text alignment
wrap_text: boolEnable text wrapping
grid_span: Option<u32>Number of columns this cell spans (gridSpan attribute)
row_span: Option<u32>Number of rows this cell spans (rowSpan attribute)
h_merge: boolWhether this cell is horizontally merged (covered by a gridSpan)
v_merge: boolWhether this cell is vertically merged (covered by a rowSpan)
Implementations§
Source§impl TableCell
impl TableCell
Sourcepub fn text_color(self, color: &str) -> Self
pub fn text_color(self, color: &str) -> Self
Set cell text color (RGB hex format, e.g., “FF0000” or “#FF0000”)
Sourcepub fn background_color(self, color: &str) -> Self
pub fn background_color(self, color: &str) -> Self
Set cell background color (RGB hex format, e.g., “FF0000” or “#FF0000”)
Sourcepub fn font_family(self, family: &str) -> Self
pub fn font_family(self, family: &str) -> Self
Set font family name
Sourcepub fn align_left(self) -> Self
pub fn align_left(self) -> Self
Set horizontal text alignment to left
Sourcepub fn align_right(self) -> Self
pub fn align_right(self) -> Self
Set horizontal text alignment to right
Sourcepub fn align_center(self) -> Self
pub fn align_center(self) -> Self
Set horizontal text alignment to center
Sourcepub fn valign(self, valign: CellVAlign) -> Self
pub fn valign(self, valign: CellVAlign) -> Self
Set vertical text alignment
Sourcepub fn valign_top(self) -> Self
pub fn valign_top(self) -> Self
Set vertical text alignment to top
Sourcepub fn valign_bottom(self) -> Self
pub fn valign_bottom(self) -> Self
Set vertical text alignment to bottom
Sourcepub fn grid_span(self, span: u32) -> Self
pub fn grid_span(self, span: u32) -> Self
Set horizontal span (gridSpan) - this cell covers multiple columns
Sourcepub fn row_span(self, span: u32) -> Self
pub fn row_span(self, span: u32) -> Self
Set vertical span (rowSpan) - this cell covers multiple rows
Sourcepub fn h_merge(self) -> Self
pub fn h_merge(self) -> Self
Mark this cell as horizontally merged (covered by another cell’s gridSpan)
Sourcepub fn v_merge(self) -> Self
pub fn v_merge(self) -> Self
Mark this cell as vertically merged (covered by another cell’s rowSpan)
Sourcepub fn with_col_span(self, span: u32) -> Self
pub fn with_col_span(self, span: u32) -> Self
Alias: set column span (gridSpan)
Sourcepub fn with_row_span(self, span: u32) -> Self
pub fn with_row_span(self, span: u32) -> Self
Alias: set row span
Sourcepub fn with_h_merge(self) -> Self
pub fn with_h_merge(self) -> Self
Alias: set horizontal merge flag
Sourcepub fn with_v_merge(self) -> Self
pub fn with_v_merge(self) -> Self
Alias: set vertical merge flag
Source§impl TableCell
impl TableCell
Sourcepub fn to_text_format(&self) -> TextFormat
pub fn to_text_format(&self) -> TextFormat
Convert cell formatting to the shared text format model.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TableCell
impl RefUnwindSafe for TableCell
impl Send for TableCell
impl Sync for TableCell
impl Unpin for TableCell
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.