pub struct Node {
pub tag_name: Option<NodeType>,
pub value: Option<String>,
pub attributes: Option<Attributes>,
pub within_special_tag: Option<Vec<NodeType>>,
pub children: Vec<Node>,
}
Expand description
Represents a node in the HTML tree.
Fields§
§tag_name: Option<NodeType>
§value: Option<String>
§attributes: Option<Attributes>
§within_special_tag: Option<Vec<NodeType>>
§children: Vec<Node>
Implementations§
Source§impl Node
impl Node
Sourcepub fn is_in_special_tag(&self, tags: &[NodeType]) -> bool
pub fn is_in_special_tag(&self, tags: &[NodeType]) -> bool
Checks whether the node is within any of the special tags passed in
Sourcepub fn leading_spaces(&self) -> String
pub fn leading_spaces(&self) -> String
Returns the leading spaces if there is any This is used to format the output of the unordered and ordered lists
Trait Implementations§
impl Eq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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