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§
Sourcefn css_property_seen(&self) -> &FxHashMap<String, String>
fn css_property_seen(&self) -> &FxHashMap<String, String>
Map of CSS properties already processed, used to avoid duplicates.
Sourcefn css_property_seen_mut(&mut self) -> &mut FxHashMap<String, String>
fn css_property_seen_mut(&mut self) -> &mut FxHashMap<String, String>
Mutable access to the CSS properties map.
Sourcefn other_injected_css_rules(&self) -> &InjectableStylesMap
fn other_injected_css_rules(&self) -> &InjectableStylesMap
Access to injected CSS rules for keyframes, position-try, etc.
Sourcefn other_injected_css_rules_mut(&mut self) -> &mut InjectableStylesMap
fn other_injected_css_rules_mut(&mut self) -> &mut InjectableStylesMap
Mutable access to injected CSS rules.
Sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Downcast to concrete type for bridge during migration.