Trait parsoid::WikinodeIterator [−][src]
pub trait WikinodeIterator {
Show 25 methods
fn as_node(&self) -> &NodeRef;
fn append<N: WikiMultinode>(&self, code: &N) { ... }
fn prepend<N: WikiMultinode>(&self, code: &N) { ... }
fn insert_after<N: WikiMultinode>(&self, code: &N) { ... }
fn insert_before<N: WikiMultinode>(&self, code: &N) { ... }
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_comments(&self) -> Vec<Comment> { ... }
fn filter_templates(&self) -> Result<Vec<Template>> { ... }
fn filter_parser_functions(&self) -> Result<Vec<Template>> { ... }
fn iter_sections(&self) -> Vec<Section> { ... }
fn filter_noinclude(&self) -> Vec<NoInclude> { ... }
fn filter_onlyinclude(&self) -> Vec<OnlyInclude> { ... }
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> { ... }
}
Expand description
Collection of iterators and mutators that allow operating on a tree of Wikinodes
Required methods
Provided methods
fn append<N: WikiMultinode>(&self, code: &N)
fn append<N: WikiMultinode>(&self, code: &N)
Append a node as a child
fn prepend<N: WikiMultinode>(&self, code: &N)
fn prepend<N: WikiMultinode>(&self, code: &N)
Prepend a node as a child
fn insert_after<N: WikiMultinode>(&self, code: &N)
fn insert_after<N: WikiMultinode>(&self, code: &N)
Insert a node after the current node, as a sibling
fn insert_before<N: WikiMultinode>(&self, code: &N)
fn insert_before<N: WikiMultinode>(&self, code: &N)
Insert a node before the current node, as a sibling
fn select_first(&self, selector: &str) -> Option<Wikinode>
fn select_first(&self, selector: &str) -> Option<Wikinode>
Get the first element that matches the selector, if possible
fn filter_links(&self) -> Vec<WikiLink>
fn filter_links(&self) -> Vec<WikiLink>
Get a list of all wikilinks ([[Foo|bar]]
)
fn filter_external_links(&self) -> Vec<ExtLink>
fn filter_external_links(&self) -> Vec<ExtLink>
Get a list of all external links ([https://example.org/ Example]
)
fn filter_categories(&self) -> Vec<Category>
fn filter_categories(&self) -> Vec<Category>
Get a list of all categories
fn filter_comments(&self) -> Vec<Comment>
fn filter_comments(&self) -> Vec<Comment>
Get a list of all comments (<!-- example -->
)
fn filter_templates(&self) -> Result<Vec<Template>>
fn filter_templates(&self) -> Result<Vec<Template>>
Get a list of templates
fn filter_parser_functions(&self) -> Result<Vec<Template>>
fn filter_parser_functions(&self) -> Result<Vec<Template>>
Get a list of parser functions.
fn iter_sections(&self) -> Vec<Section>
fn filter_noinclude(&self) -> Vec<NoInclude>
fn filter_onlyinclude(&self) -> Vec<OnlyInclude>
fn inclusive_ancestors(&self) -> WikinodeMap<Ancestors>
fn inclusive_ancestors(&self) -> WikinodeMap<Ancestors>
Return an iterator of references to this node and its ancestors.
Return an iterator of references to this node’s ancestors.
fn inclusive_preceding_siblings(&self) -> WikinodeMap<Rev<Siblings>>
fn inclusive_preceding_siblings(&self) -> WikinodeMap<Rev<Siblings>>
Return an iterator of references to this node and the siblings before it.
fn preceding_simblings(&self) -> WikinodeMap<Rev<Siblings>>
fn preceding_simblings(&self) -> WikinodeMap<Rev<Siblings>>
Return an iterator of references to this node’s siblings before it.
fn inclusive_following_siblings(&self) -> WikinodeMap<Siblings>
fn inclusive_following_siblings(&self) -> WikinodeMap<Siblings>
Return an iterator of references to this node and the siblings after it.
fn following_siblings(&self) -> WikinodeMap<Siblings>
fn following_siblings(&self) -> WikinodeMap<Siblings>
Return an iterator of references to this node’s siblings after it.
Return an iterator of references to this node’s children.
fn inclusive_descendants(&self) -> WikinodeMap<Descendants>
fn inclusive_descendants(&self) -> WikinodeMap<Descendants>
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>
fn descendants(&self) -> WikinodeMap<Descendants>
Return an iterator of references to this node’s descendants, in tree order. Parent nodes appear before the descendants.