pub trait WikinodeIterator: Sealed {
Show 32 methods
// Required method
fn as_node(&self) -> &NodeRef;
// Provided methods
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_images(&self) -> Vec<Image> { ... }
fn filter_templates(&self) -> Result<Vec<Template>> { ... }
fn filter_parser_functions(&self) -> Result<Vec<Template>> { ... }
fn filter_reference_links(&self) -> Vec<ReferenceLink> { ... }
fn filter_reference_lists(&self) -> Vec<ReferenceList> { ... }
fn filter_references(&self) -> Vec<Reference> { ... }
fn iter_sections(&self) -> Vec<Section> { ... }
fn filter_noinclude(&self) -> Vec<NoInclude> { ... }
fn filter_onlyinclude(&self) -> Vec<OnlyInclude> { ... }
fn parent(&self) -> Option<Wikinode> { ... }
fn next_sibling(&self) -> Option<Wikinode> { ... }
fn previous_sibling(&self) -> Option<Wikinode> { ... }
fn inclusive_ancestors(&self) -> WikinodeMap<Ancestors> { ... }
fn ancestors(&self) -> WikinodeMap<Ancestors> { ... }
fn inclusive_preceding_siblings(&self) -> WikinodeMap<Rev<Siblings>> { ... }
fn preceding_siblings(&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§
Sourcefn append<N: WikiMultinode>(&self, code: &N)
fn append<N: WikiMultinode>(&self, code: &N)
Append a node as a child
Sourcefn prepend<N: WikiMultinode>(&self, code: &N)
fn prepend<N: WikiMultinode>(&self, code: &N)
Prepend a node as a child
Sourcefn 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
Sourcefn 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
Sourcefn 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
Sourcefn filter_links(&self) -> Vec<WikiLink>
fn filter_links(&self) -> Vec<WikiLink>
Get a list of all wikilinks ([[Foo|bar]]
)
Sourcefn filter_external_links(&self) -> Vec<ExtLink>
fn filter_external_links(&self) -> Vec<ExtLink>
Get a list of all external links ([https://example.org/ Example]
)
Sourcefn filter_categories(&self) -> Vec<Category>
fn filter_categories(&self) -> Vec<Category>
Get a list of all categories
Sourcefn filter_comments(&self) -> Vec<Comment>
fn filter_comments(&self) -> Vec<Comment>
Get a list of all comments (<!-- example -->
)
Sourcefn filter_images(&self) -> Vec<Image>
fn filter_images(&self) -> Vec<Image>
Get a list of all iamges
Sourcefn filter_templates(&self) -> Result<Vec<Template>>
fn filter_templates(&self) -> Result<Vec<Template>>
Get a list of templates
Sourcefn filter_parser_functions(&self) -> Result<Vec<Template>>
fn filter_parser_functions(&self) -> Result<Vec<Template>>
Get a list of parser functions.
Sourcefn filter_reference_links(&self) -> Vec<ReferenceLink>
fn filter_reference_links(&self) -> Vec<ReferenceLink>
Get a list of all reference links on the page, e.g. [1]
.
This includes both grouped and ungrouped references.
Sourcefn filter_reference_lists(&self) -> Vec<ReferenceList>
fn filter_reference_lists(&self) -> Vec<ReferenceList>
Get a list of all reference lists on the page, e.g. <references>
Sourcefn filter_references(&self) -> Vec<Reference>
fn filter_references(&self) -> Vec<Reference>
Get all references on the page.
This contains grouped and ungrouped references, and are returned in the order they are presented in reference lists, so e.g. if the wikitext is:
<references group="foo"/>
<references/>
then the “foo” group references will be ordered first in the list, and then the ungrouped ones.
fn iter_sections(&self) -> Vec<Section>
fn filter_noinclude(&self) -> Vec<NoInclude>
fn filter_onlyinclude(&self) -> Vec<OnlyInclude>
Sourcefn next_sibling(&self) -> Option<Wikinode>
fn next_sibling(&self) -> Option<Wikinode>
Return the next sibling node, if it has one
Sourcefn previous_sibling(&self) -> Option<Wikinode>
fn previous_sibling(&self) -> Option<Wikinode>
Return the previous sibling node, if it has one
Sourcefn inclusive_ancestors(&self) -> WikinodeMap<Ancestors>
fn inclusive_ancestors(&self) -> WikinodeMap<Ancestors>
Return an iterator of references to this node and its ancestors.
Sourcefn ancestors(&self) -> WikinodeMap<Ancestors>
fn ancestors(&self) -> WikinodeMap<Ancestors>
Return an iterator of references to this node’s ancestors.
Sourcefn 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.
Sourcefn preceding_siblings(&self) -> WikinodeMap<Rev<Siblings>>
fn preceding_siblings(&self) -> WikinodeMap<Rev<Siblings>>
Return an iterator of references to this node’s siblings before it.
Sourcefn 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.
Sourcefn following_siblings(&self) -> WikinodeMap<Siblings>
fn following_siblings(&self) -> WikinodeMap<Siblings>
Return an iterator of references to this node’s siblings after it.
Sourcefn children(&self) -> WikinodeMap<Siblings>
fn children(&self) -> WikinodeMap<Siblings>
Return an iterator of references to this node’s children.
Sourcefn 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.
Sourcefn 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.
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.