Struct style::context::CascadeInputs
source · pub struct CascadeInputs {
pub rules: Option<StrongRuleNode>,
pub visited_rules: Option<StrongRuleNode>,
pub flags: ComputedValueFlags,
}
Expand description
The structure holds various intermediate inputs that are eventually used by by the cascade.
The matching and cascading process stores them in this format temporarily
within the CurrentElementInfo
. At the end of the cascade, they are folded
down into the main ComputedValues
to reduce memory usage per element while
still remaining accessible.
Fields§
§rules: Option<StrongRuleNode>
The rule node representing the ordered list of rules matched for this node.
visited_rules: Option<StrongRuleNode>
The rule node representing the ordered list of rules matched for this node if visited, only computed if there’s a relevant link for this element. A element’s “relevant link” is the element being matched if it is a link or the nearest ancestor link.
flags: ComputedValueFlags
The set of flags from container queries that we need for invalidation.
Implementations§
source§impl CascadeInputs
impl CascadeInputs
sourcepub fn new_from_style(style: &ComputedValues) -> Self
pub fn new_from_style(style: &ComputedValues) -> Self
Construct inputs from previous cascade results, if any.
Trait Implementations§
source§impl Clone for CascadeInputs
impl Clone for CascadeInputs
source§fn clone(&self) -> CascadeInputs
fn clone(&self) -> CascadeInputs
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CascadeInputs
impl Debug for CascadeInputs
source§impl Default for CascadeInputs
impl Default for CascadeInputs
source§fn default() -> CascadeInputs
fn default() -> CascadeInputs
Auto Trait Implementations§
impl Freeze for CascadeInputs
impl !RefUnwindSafe for CascadeInputs
impl Send for CascadeInputs
impl Sync for CascadeInputs
impl Unpin for CascadeInputs
impl !UnwindSafe for CascadeInputs
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
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>
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>
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 more