pub struct TableCellPart {Show 16 fields
pub text: String,
pub row_span: u32,
pub col_span: u32,
pub bold: bool,
pub italic: bool,
pub underline: bool,
pub strikethrough: bool,
pub background_color: Option<String>,
pub text_color: Option<String>,
pub font_size: Option<u32>,
pub font_family: Option<String>,
pub h_align: HorizontalAlign,
pub v_align: VerticalAlign,
pub borders: Option<CellBorders>,
pub margins: Option<CellMargins>,
pub is_merged: bool,
}Expand description
Table cell with advanced formatting
Fields§
§text: String§row_span: u32§col_span: u32§bold: bool§italic: bool§underline: bool§strikethrough: bool§background_color: Option<String>§text_color: Option<String>§font_size: Option<u32>§font_family: Option<String>§h_align: HorizontalAlign§v_align: VerticalAlign§borders: Option<CellBorders>§margins: Option<CellMargins>§is_merged: boolImplementations§
Source§impl TableCellPart
impl TableCellPart
Sourcepub fn strikethrough(self) -> Self
pub fn strikethrough(self) -> Self
Set strikethrough
Sourcepub fn background(self, color: impl Into<String>) -> Self
pub fn background(self, color: impl Into<String>) -> Self
Set background color
Sourcepub fn align(self, align: HorizontalAlign) -> Self
pub fn align(self, align: HorizontalAlign) -> Self
Set horizontal alignment
Sourcepub fn valign(self, align: VerticalAlign) -> Self
pub fn valign(self, align: VerticalAlign) -> Self
Set vertical alignment
Sourcepub fn borders(self, borders: CellBorders) -> Self
pub fn borders(self, borders: CellBorders) -> Self
Set all borders
Sourcepub fn border(self, width_pt: f32, color: impl Into<String>) -> Self
pub fn border(self, width_pt: f32, color: impl Into<String>) -> Self
Set uniform border on all sides
Sourcepub fn margins(self, margins: CellMargins) -> Self
pub fn margins(self, margins: CellMargins) -> Self
Set cell margins
Trait Implementations§
Source§impl Clone for TableCellPart
impl Clone for TableCellPart
Source§fn clone(&self) -> TableCellPart
fn clone(&self) -> TableCellPart
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TableCellPart
impl RefUnwindSafe for TableCellPart
impl Send for TableCellPart
impl Sync for TableCellPart
impl Unpin for TableCellPart
impl UnwindSafe for TableCellPart
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