Skip to main content

stylex_transform/shared/structures/
null_pre_rule.rs

1use super::{
2  pre_rule::{CompiledResult, PreRule, PreRuleValue},
3  state_manager::StateManager,
4};
5
6#[derive(Debug, Clone, PartialEq, Copy)]
7pub(crate) struct NullPreRule {}
8
9impl NullPreRule {
10  pub(crate) fn new() -> Self {
11    NullPreRule {}
12  }
13}
14
15impl Default for NullPreRule {
16  fn default() -> Self {
17    NullPreRule::new()
18  }
19}
20
21impl PreRule for NullPreRule {
22  fn get_value(&self) -> Option<PreRuleValue> {
23    None
24  }
25  fn compiled(&mut self, _: &mut StateManager) -> CompiledResult {
26    CompiledResult::Null
27  }
28  fn equals(&self, _other: &dyn PreRule) -> bool {
29    false
30  }
31}