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 row_span: u32,
pub col_span: u32,
pub v_merge: bool,
pub h_merge: bool,
}Expand description
Table cell content
Fields§
§text: String§bold: bool§italic: bool§underline: bool§text_color: Option<String>§background_color: Option<String>§font_size: Option<u32>§font_family: Option<String>§align: CellAlign§valign: CellVAlign§wrap_text: bool§row_span: u32§col_span: u32§v_merge: bool§h_merge: boolImplementations§
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 with_row_span(self, span: u32) -> Self
pub fn with_row_span(self, span: u32) -> Self
Set row span (number of rows to merge down)
Sourcepub fn with_col_span(self, span: u32) -> Self
pub fn with_col_span(self, span: u32) -> Self
Set column span (number of columns to merge right)
Sourcepub fn with_v_merge(self) -> Self
pub fn with_v_merge(self) -> Self
Set vertical merge flag (for cells covered by row span)
Sourcepub fn with_h_merge(self) -> Self
pub fn with_h_merge(self) -> Self
Set horizontal merge flag (for cells covered by col span)
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 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,
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