Skip to main content

ConditionalRuleExt

Trait ConditionalRuleExt 

Source
pub trait ConditionalRuleExt {
    // Required methods
    fn rule_type(&self) -> Option<&ConditionalType>;
    fn priority(&self) -> i32;
    fn has_color_scale(&self) -> bool;
    fn has_data_bar(&self) -> bool;
    fn has_icon_set(&self) -> bool;
    fn formulas(&self) -> &[STFormula] ;
}
Expand description

Extension methods for types::ConditionalRule.

Provides convenient access to rule type and visualization sub-elements. Gated on the sml-styling feature.

ECMA-376 Part 1, Section 18.3.1.10 (cfRule).

Required Methods§

Source

fn rule_type(&self) -> Option<&ConditionalType>

Get the rule type (e.g., ColorScale, DataBar, CellIs, Expression).

Source

fn priority(&self) -> i32

Get the rule priority (lower number = higher priority).

Source

fn has_color_scale(&self) -> bool

Check if this rule uses a color scale visualization.

Source

fn has_data_bar(&self) -> bool

Check if this rule uses a data bar visualization.

Source

fn has_icon_set(&self) -> bool

Check if this rule uses an icon set visualization.

Source

fn formulas(&self) -> &[STFormula]

Get the formula expressions associated with this rule.

For cellIs rules, contains 1-2 formulas (operands). For expression rules, contains 1 formula. For visualization rules (colorScale, dataBar, iconSet), empty.

Implementors§

Source§

impl ConditionalRuleExt for ConditionalRule

Available on crate feature sml-styling only.