pub struct StyledNode {
pub node_id: NodeId,
pub tag: Option<String>,
pub attrs: HashMap<String, String>,
pub text: Option<String>,
pub style: ComputedStyle,
pub children: Vec<StyledNode>,
}Expand description
A node in the DOM tree, with computed style and children.
Fields§
§node_id: NodeIdUnique identifier for the node, used for caching and referencing in layout and paint stages.
tag: Option<String>The tag name of the node, e.g. “div”, “p”, “span”, etc.
attrs: HashMap<String, String>The attributes of the node, e.g. “id” and “class” attributes.
text: Option<String>The text content of the node, if any.
style: ComputedStyleThe
children: Vec<StyledNode>Trait Implementations§
Source§impl Clone for StyledNode
impl Clone for StyledNode
Source§fn clone(&self) -> StyledNode
fn clone(&self) -> StyledNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StyledNode
impl Debug for StyledNode
Source§impl PartialEq for StyledNode
impl PartialEq for StyledNode
impl StructuralPartialEq for StyledNode
Auto Trait Implementations§
impl Freeze for StyledNode
impl RefUnwindSafe for StyledNode
impl Send for StyledNode
impl Sync for StyledNode
impl Unpin for StyledNode
impl UnsafeUnpin for StyledNode
impl UnwindSafe for StyledNode
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<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 more