pub trait Node:
    Eq
    + Clone
    + Debug {
    type ProcessingInstruction: ProcessingInstruction;
    type Document: Document<Node = Self>;
    type Attribute: Attribute<Node = Self>;
    type Element: Element<Node = Self>;
Show 19 methods
    // Required methods
    fn is_comment(&self) -> bool;
    fn is_text(&self) -> bool;
    fn text_content(&self) -> String;
    fn language(&self) -> Option<String>;
    fn parent(&self) -> Option<Self>;
    fn children(&self) -> impl Iterator<Item = Self>;
    fn compare_tree_order(&self, other: &Self) -> Ordering;
    fn traverse_preorder(&self) -> impl Iterator<Item = Self>;
    fn inclusive_ancestors(&self) -> impl Iterator<Item = Self>;
    fn preceding_nodes(&self, root: &Self) -> impl Iterator<Item = Self>;
    fn following_nodes(&self, root: &Self) -> impl Iterator<Item = Self>;
    fn preceding_siblings(&self) -> impl Iterator<Item = Self>;
    fn following_siblings(&self) -> impl Iterator<Item = Self>;
    fn owner_document(&self) -> Self::Document;
    fn to_opaque(&self) -> impl Eq + Hash;
    fn as_processing_instruction(&self) -> Option<Self::ProcessingInstruction>;
    fn as_attribute(&self) -> Option<Self::Attribute>;
    fn as_element(&self) -> Option<Self::Element>;
    fn get_root_node(&self) -> Self;
}Expand description
A handle to a DOM node exposing all functionality needed by xpath.
Required Associated Types§
type ProcessingInstruction: ProcessingInstruction
type Document: Document<Node = Self>
type Attribute: Attribute<Node = Self>
type Element: Element<Node = Self>
Required Methods§
fn is_comment(&self) -> bool
fn is_text(&self) -> bool
Sourcefn text_content(&self) -> String
 
fn text_content(&self) -> String
Equivalent to textContent attribute.
fn parent(&self) -> Option<Self>
fn children(&self) -> impl Iterator<Item = Self>
Sourcefn compare_tree_order(&self, other: &Self) -> Ordering
 
fn compare_tree_order(&self, other: &Self) -> Ordering
Sourcefn traverse_preorder(&self) -> impl Iterator<Item = Self>
 
fn traverse_preorder(&self) -> impl Iterator<Item = Self>
A non-shadow-including preorder traversal.
fn inclusive_ancestors(&self) -> impl Iterator<Item = Self>
fn preceding_nodes(&self, root: &Self) -> impl Iterator<Item = Self>
fn following_nodes(&self, root: &Self) -> impl Iterator<Item = Self>
fn preceding_siblings(&self) -> impl Iterator<Item = Self>
fn following_siblings(&self) -> impl Iterator<Item = Self>
fn owner_document(&self) -> Self::Document
fn to_opaque(&self) -> impl Eq + Hash
fn as_processing_instruction(&self) -> Option<Self::ProcessingInstruction>
fn as_attribute(&self) -> Option<Self::Attribute>
fn as_element(&self) -> Option<Self::Element>
fn get_root_node(&self) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.