Skip to main content

StyleOptions

Trait StyleOptions 

Source
pub trait StyleOptions {
    // Required methods
    fn options(&self) -> &StyleXStateOptions;
    fn css_property_seen(&self) -> &FxHashMap<String, String>;
    fn css_property_seen_mut(&mut self) -> &mut FxHashMap<String, String>;
    fn other_injected_css_rules(&self) -> &InjectableStylesMap;
    fn other_injected_css_rules_mut(&mut self) -> &mut InjectableStylesMap;
    fn as_any_mut(&mut self) -> &mut dyn Any;
}
Expand description

Tier 1: Minimal interface for CSS generation, PreRule, and function pointer signatures.

Object-safe — used as dyn StyleOptions in function pointer signatures (e.g., StylexExprFn, FunctionType::ArrayArgs).

StateManager implements this trait in the stylex-transform crate.

Required Methods§

Source

fn options(&self) -> &StyleXStateOptions

Access the StyleX configuration options.

Source

fn css_property_seen(&self) -> &FxHashMap<String, String>

Map of CSS properties already processed, used to avoid duplicates.

Source

fn css_property_seen_mut(&mut self) -> &mut FxHashMap<String, String>

Mutable access to the CSS properties map.

Source

fn other_injected_css_rules(&self) -> &InjectableStylesMap

Access to injected CSS rules for keyframes, position-try, etc.

Source

fn other_injected_css_rules_mut(&mut self) -> &mut InjectableStylesMap

Mutable access to injected CSS rules.

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Downcast to concrete type for bridge during migration.

Implementors§