pub struct XPathNodeSet { /* private fields */ }Expand description
XPath node-set defined in XPath 1.0.
Implementations§
Source§impl XPathNodeSet
impl XPathNodeSet
Sourcepub fn iter(&self) -> impl Iterator<Item = Node<dyn NodeSpec>> + '_
pub fn iter(&self) -> impl Iterator<Item = Node<dyn NodeSpec>> + '_
Generate an iterator to scan all nodes in this node-set.
Sourcepub fn first(&self) -> Option<&Node<dyn NodeSpec>>
pub fn first(&self) -> Option<&Node<dyn NodeSpec>>
Get the first node in this node-set.
§Note
In XPath 1.0, a node set is an unordered set; therefore, it is not the first node in any meaningful order.
Sourcepub fn last(&self) -> Option<&Node<dyn NodeSpec>>
pub fn last(&self) -> Option<&Node<dyn NodeSpec>>
Get the last node in this node-set.
§Note
In XPath 1.0, a node set is an unordered set; therefore, it is not the last node in any meaningful order.
Sourcepub fn contains(&self, node: impl Into<Node<dyn NodeSpec>>) -> bool
pub fn contains(&self, node: impl Into<Node<dyn NodeSpec>>) -> bool
Check whether node is included in this node-set.
The check is performed based on identity, not equality.
Sourcepub fn union(&self, other: &Self) -> Self
pub fn union(&self, other: &Self) -> Self
Returns the union of node-sets.
Node duplication checks are based on identity, not equality.
Sourcepub fn difference(&self, other: &Self) -> Self
pub fn difference(&self, other: &Self) -> Self
Returns the difference of node-sets.
Node duplication checks are based on identity, not equality.
Sourcepub fn intersection(&self, other: &Self) -> Self
pub fn intersection(&self, other: &Self) -> Self
Returns the intersection of node-sets.
Node duplication checks are based on identity, not equality.