Struct style::rule_tree::core::StrongRuleNode
source · 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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