Skip to main content

NodeExt

Trait NodeExt 

Source
pub trait NodeExt {
    // Required methods
    fn find(&self, selector: &str) -> Option<Node<'_>>;
    fn find_all(&self, selector: &str) -> Vec<Node<'_>>;
    fn get_function(&self, document: &Document) -> Option<Function>;
    fn get_parent(&self, kind: &str) -> Option<Node<'_>>;
    fn get_range(&self, document: &Document) -> Range;
    fn get_recipe(&self, document: &Document) -> Option<Recipe>;
    fn has_any_parent(&self, kinds: &[&str]) -> bool;
    fn siblings(&self) -> impl Iterator<Item = Node<'_>>;
}

Required Methods§

Source

fn find(&self, selector: &str) -> Option<Node<'_>>

Source

fn find_all(&self, selector: &str) -> Vec<Node<'_>>

Source

fn get_function(&self, document: &Document) -> Option<Function>

Source

fn get_parent(&self, kind: &str) -> Option<Node<'_>>

Source

fn get_range(&self, document: &Document) -> Range

Source

fn get_recipe(&self, document: &Document) -> Option<Recipe>

Source

fn has_any_parent(&self, kinds: &[&str]) -> bool

Source

fn siblings(&self) -> impl Iterator<Item = Node<'_>>

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.

Implementations on Foreign Types§

Source§

impl NodeExt for Node<'_>

Source§

fn find(&self, selector: &str) -> Option<Node<'_>>

Source§

fn find_all(&self, selector: &str) -> Vec<Node<'_>>

Source§

fn get_function(&self, document: &Document) -> Option<Function>

Source§

fn get_parent(&self, kind: &str) -> Option<Node<'_>>

Source§

fn get_range(&self, document: &Document) -> Range

Source§

fn get_recipe(&self, document: &Document) -> Option<Recipe>

Source§

fn has_any_parent(&self, kinds: &[&str]) -> bool

Source§

fn siblings(&self) -> impl Iterator<Item = Node<'_>>

Implementors§