Trait parsoid::WikinodeIterator[][src]

pub trait WikinodeIterator {
    fn as_node(&self) -> &NodeRef;

    fn append(&self, code: &NodeRef) { ... }
fn prepend(&self, code: &NodeRef) { ... }
fn insert_after(&self, code: &NodeRef) { ... }
fn insert_before(&self, code: &NodeRef) { ... }
fn select(&self, selector: &str) -> Vec<Wikinode> { ... }
fn select_first(&self, selector: &str) -> Option<Wikinode> { ... }
fn filter_links(&self) -> Vec<WikiLink> { ... }
fn filter_external_links(&self) -> Vec<ExtLink> { ... }
fn filter_categories(&self) -> Vec<Category> { ... }
fn filter_templates(&self) -> Result<Vec<Template>> { ... }
fn filter_parser_functions(&self) -> Result<Vec<Template>> { ... }
fn iter_sections(&self) -> Vec<Section> { ... }
fn inclusive_ancestors(&self) -> WikinodeMap<Ancestors> { ... }
fn ancestors(&self) -> WikinodeMap<Ancestors> { ... }
fn inclusive_preceding_siblings(&self) -> WikinodeMap<Rev<Siblings>> { ... }
fn preceding_simblings(&self) -> WikinodeMap<Rev<Siblings>> { ... }
fn inclusive_following_siblings(&self) -> WikinodeMap<Siblings> { ... }
fn following_siblings(&self) -> WikinodeMap<Siblings> { ... }
fn children(&self) -> WikinodeMap<Siblings> { ... }
fn inclusive_descendants(&self) -> WikinodeMap<Descendants> { ... }
fn descendants(&self) -> WikinodeMap<Descendants> { ... } }

Collection of iterators and mutators that allow operating on a tree of Wikinodes

Required methods

fn as_node(&self) -> &NodeRef[src]

Loading content...

Provided methods

fn append(&self, code: &NodeRef)[src]

Append a node as a child

fn prepend(&self, code: &NodeRef)[src]

Prepend a node as a child

fn insert_after(&self, code: &NodeRef)[src]

Insert a node after the current node, as a sibling

fn insert_before(&self, code: &NodeRef)[src]

Insert a node before the current node, as a sibling

fn select(&self, selector: &str) -> Vec<Wikinode>[src]

Select some wiki nodes

fn select_first(&self, selector: &str) -> Option<Wikinode>[src]

Get the first element that matches the selector, if possible

Get a list of all wikilinks ([[Foo|bar]])

Get a list of all external links ([https://example.org/ Example])

fn filter_categories(&self) -> Vec<Category>[src]

Get a list of all categories

fn filter_templates(&self) -> Result<Vec<Template>>[src]

Get a list of templates

fn filter_parser_functions(&self) -> Result<Vec<Template>>[src]

Get a list of parser functions.

fn iter_sections(&self) -> Vec<Section>[src]

fn inclusive_ancestors(&self) -> WikinodeMap<Ancestors>[src]

Return an iterator of references to this node and its ancestors.

fn ancestors(&self) -> WikinodeMap<Ancestors>[src]

Return an iterator of references to this node’s ancestors.

fn inclusive_preceding_siblings(&self) -> WikinodeMap<Rev<Siblings>>[src]

Return an iterator of references to this node and the siblings before it.

fn preceding_simblings(&self) -> WikinodeMap<Rev<Siblings>>[src]

Return an iterator of references to this node’s siblings before it.

fn inclusive_following_siblings(&self) -> WikinodeMap<Siblings>[src]

Return an iterator of references to this node and the siblings after it.

fn following_siblings(&self) -> WikinodeMap<Siblings>[src]

Return an iterator of references to this node’s siblings after it.

fn children(&self) -> WikinodeMap<Siblings>[src]

Return an iterator of references to this node’s children.

fn inclusive_descendants(&self) -> WikinodeMap<Descendants>[src]

Return an iterator of references to this node and its descendants, in tree order. Parent nodes appear before the descendants.

fn descendants(&self) -> WikinodeMap<Descendants>[src]

Return an iterator of references to this node’s descendants, in tree order. Parent nodes appear before the descendants.

Loading content...

Implementors

Loading content...