Trait Node

Source
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 lookup_namespace_uri(&self, uri: Option<&str>) -> Option<String>;
}
Expand description

A handle to a DOM node exposing all functionality needed by xpath.

Required Associated Types§

Required Methods§

Source

fn is_comment(&self) -> bool

Source

fn is_text(&self) -> bool

Source

fn text_content(&self) -> String

Equivalent to textContent attribute.

Source

fn language(&self) -> Option<String>

Source

fn parent(&self) -> Option<Self>

Source

fn children(&self) -> impl Iterator<Item = Self>

Source

fn compare_tree_order(&self, other: &Self) -> Ordering

Source

fn traverse_preorder(&self) -> impl Iterator<Item = Self>

A non-shadow-including preorder traversal.

Source

fn inclusive_ancestors(&self) -> impl Iterator<Item = Self>

Source

fn preceding_nodes(&self, root: &Self) -> impl Iterator<Item = Self>

Source

fn following_nodes(&self, root: &Self) -> impl Iterator<Item = Self>

Source

fn preceding_siblings(&self) -> impl Iterator<Item = Self>

Source

fn following_siblings(&self) -> impl Iterator<Item = Self>

Source

fn owner_document(&self) -> Self::Document

Source

fn to_opaque(&self) -> impl Eq + Hash

Source

fn as_processing_instruction(&self) -> Option<Self::ProcessingInstruction>

Source

fn as_attribute(&self) -> Option<Self::Attribute>

Source

fn as_element(&self) -> Option<Self::Element>

Source

fn lookup_namespace_uri(&self, uri: Option<&str>) -> Option<String>

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.

Implementors§