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.
Sourcepub fn comparison(&self) -> Option<(Comparison, &Value)>
pub fn comparison(&self) -> Option<(Comparison, &Value)>
The comparison and the value it compares with; None for a rule with
a Rust predicate.
Trait Implementations§
Source§impl Display for StyleRule
The spec (StyleRule::to_spec), or COLUMN <predicate>:STYLE for a
rule with a Rust predicate.
impl Display for StyleRule
The spec (StyleRule::to_spec), or COLUMN <predicate>:STYLE for a
rule with a Rust predicate.
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
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> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more