pub struct CellStyle {
pub background_color: Option<Color>,
pub text_color: Option<Color>,
pub font: Option<Font>,
pub font_size: Option<f64>,
pub padding: Padding,
pub alignment: CellAlignment,
pub border: BorderConfiguration,
pub border_style: BorderStyle,
pub text_wrap: bool,
pub min_height: Option<f64>,
pub max_height: Option<f64>,
}Expand description
Comprehensive cell styling configuration
Fields§
§background_color: Option<Color>Background color of the cell
text_color: Option<Color>Text color
font: Option<Font>Font to use for text
font_size: Option<f64>Font size
padding: PaddingCell padding
alignment: CellAlignmentText alignment within the cell
border: BorderConfigurationBorder style configuration
border_style: BorderStyleSimple border style (for backward compatibility)
text_wrap: boolWhether text should wrap within the cell
min_height: Option<f64>Minimum cell height
max_height: Option<f64>Maximum cell height (text will be clipped if exceeded)
Implementations§
Source§impl CellStyle
impl CellStyle
Sourcepub fn background_color(self, color: Color) -> Self
pub fn background_color(self, color: Color) -> Self
Set background color
Sourcepub fn text_color(self, color: Color) -> Self
pub fn text_color(self, color: Color) -> Self
Set text color
Sourcepub fn alignment(self, alignment: CellAlignment) -> Self
pub fn alignment(self, alignment: CellAlignment) -> Self
Set alignment
Sourcepub fn border_config(self, border: BorderConfiguration) -> Self
pub fn border_config(self, border: BorderConfiguration) -> Self
Set border configuration
Sourcepub fn border(self, style: BorderStyle, width: f64, color: Color) -> Self
pub fn border(self, style: BorderStyle, width: f64, color: Color) -> Self
Set simple border (style, width, color) - used by tests
Sourcepub fn min_height(self, height: f64) -> Self
pub fn min_height(self, height: f64) -> Self
Set minimum cell height
Sourcepub fn max_height(self, height: f64) -> Self
pub fn max_height(self, height: f64) -> Self
Set maximum cell height
Sourcepub fn alternating() -> Self
pub fn alternating() -> Self
Create an alternating row style (with light background)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CellStyle
impl RefUnwindSafe for CellStyle
impl Send for CellStyle
impl Sync for CellStyle
impl Unpin for CellStyle
impl UnwindSafe for CellStyle
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().