pub enum Rule {
AtRule(AtRule),
QualifiedRule(QualifiedRule),
Declarations(Vec<Declaration>),
}Expand description
§5.2 L1635-1637: A rule is either an at-rule or a qualified rule.
Also carries a Declarations variant (§5.5.5 L2492-2498) for the
mixed list output of consume_a_blocks_contents — a block’s
contents can be a sequence of declarations interleaved with rules,
and we model each declaration-list run as a Rule::Declarations.
Variants§
AtRule(AtRule)
QualifiedRule(QualifiedRule)
Declarations(Vec<Declaration>)
§5.5.5: a list of declarations (a “run” of consecutive
declarations inside a block, before the next child rule). At
the CSSOM boundary this gets materialized as either
CSSStyleDeclaration or CSSNestedDeclarations.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Rule
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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