pub struct StyleRule { /* private fields */ }Expand description
One conditional style. See the module docs.
Implementations§
Source§impl StyleRule
impl StyleRule
Sourcepub fn new(
column: impl Into<ColumnRef>,
comparison: Comparison,
value: impl Into<Value>,
style: Style,
) -> Self
pub fn new( column: impl Into<ColumnRef>, comparison: Comparison, value: impl Into<Value>, style: Style, ) -> Self
Style a cell of column when it compares to value by comparison.
Sourcepub fn when(
column: impl Into<ColumnRef>,
predicate: impl Fn(&Value) -> bool + Send + Sync + 'static,
style: Style,
) -> Self
pub fn when( column: impl Into<ColumnRef>, predicate: impl Fn(&Value) -> bool + Send + Sync + 'static, style: Style, ) -> Self
Style a cell of column when predicate holds for its value.
Sourcepub fn target_kind(&self) -> Target
pub fn target_kind(&self) -> Target
What it styles.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for StyleRule
impl !UnwindSafe for StyleRule
impl Freeze for StyleRule
impl Send for StyleRule
impl Sync for StyleRule
impl Unpin for StyleRule
impl UnsafeUnpin for StyleRule
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