pub struct StrongRuleNode {
    p: UnsafeBox<RuleNode>,
}Expand description
A strong reference to a rule node.
Fields§
§p: UnsafeBox<RuleNode>Implementations§
Source§impl StrongRuleNode
 
impl StrongRuleNode
fn new(n: Box<RuleNode>) -> Self
unsafe fn from_unsafe_box(p: UnsafeBox<RuleNode>) -> Self
unsafe fn downgrade(&self) -> WeakRuleNode
Sourcepub fn parent(&self) -> Option<&StrongRuleNode>
 
pub fn parent(&self) -> Option<&StrongRuleNode>
Get the parent rule node of this rule node.
pub(super) fn ensure_child( &self, root: &StrongRuleNode, source: StyleSource, cascade_priority: CascadePriority, ) -> StrongRuleNode
Sourcepub fn style_source(&self) -> Option<&StyleSource>
 
pub fn style_source(&self) -> Option<&StyleSource>
Get the style source corresponding to this rule node. May return None
if it’s the root node, which means that the node hasn’t matched any
rules.
Sourcepub fn cascade_priority(&self) -> CascadePriority
 
pub fn cascade_priority(&self) -> CascadePriority
The cascade priority.
Sourcepub fn cascade_level(&self) -> CascadeLevel
 
pub fn cascade_level(&self) -> CascadeLevel
The cascade level.
Sourcepub fn importance(&self) -> Importance
 
pub fn importance(&self) -> Importance
The importance.
Sourcepub unsafe fn has_children_for_testing(&self) -> bool
 
pub unsafe fn has_children_for_testing(&self) -> bool
Returns whether this node has any child, only intended for testing purposes.
pub(super) fn dump<W: Write>( &self, guards: &StylesheetGuards<'_>, writer: &mut W, indent: usize, )
Source§impl StrongRuleNode
 
impl StrongRuleNode
Sourcepub fn self_and_ancestors(&self) -> SelfAndAncestors<'_> ⓘ
 
pub fn self_and_ancestors(&self) -> SelfAndAncestors<'_> ⓘ
Get an iterator for this rule node and its ancestors.
Sourcepub fn has_animation_or_transition_rules(&self) -> bool
 
pub fn has_animation_or_transition_rules(&self) -> bool
Returns true if there is either animation or transition level rule.
Sourcepub fn get_properties_overriding_animations(
    &self,
    guards: &StylesheetGuards<'_>,
) -> (LonghandIdSet, bool)
 
pub fn get_properties_overriding_animations( &self, guards: &StylesheetGuards<'_>, ) -> (LonghandIdSet, bool)
Get a set of properties whose CascadeLevel are higher than Animations but not equal to Transitions.
If there are any custom properties, we set the boolean value of the returned tuple to true.
Trait Implementations§
Source§impl Clone for StrongRuleNode
 
impl Clone for StrongRuleNode
Source§impl Debug for StrongRuleNode
 
impl Debug for StrongRuleNode
Source§impl Drop for StrongRuleNode
 
impl Drop for StrongRuleNode
Source§impl Hash for StrongRuleNode
 
impl Hash for StrongRuleNode
Source§impl MallocSizeOf for StrongRuleNode
 
impl MallocSizeOf for StrongRuleNode
Source§fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
 
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl PartialEq for StrongRuleNode
 
impl PartialEq for StrongRuleNode
impl Eq for StrongRuleNode
Auto Trait Implementations§
impl Freeze for StrongRuleNode
impl !RefUnwindSafe for StrongRuleNode
impl Send for StrongRuleNode
impl Sync for StrongRuleNode
impl Unpin for StrongRuleNode
impl !UnwindSafe for StrongRuleNode
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
 
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
 
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
 
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
 
fn maybe_boxed(self) -> T
Convert