pub struct NodeSet { /* private fields */ }Expand description
An XPath node-set.
Internally stored as a sorted, deduplicated Vec of node pointers in document order.
Implementations§
Source§impl NodeSet
impl NodeSet
pub fn new() -> Self
pub fn singleton(node: *mut _xmlNode) -> Self
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn iter(&self) -> impl Iterator<Item = *mut _xmlNode> + '_
pub fn get(&self, index: usize) -> Option<*mut _xmlNode>
pub fn first(&self) -> Option<*mut _xmlNode>
pub fn last(&self) -> Option<*mut _xmlNode>
pub fn contains(&self, node: *mut _xmlNode) -> bool
Sourcepub fn push(&mut self, node: *mut _xmlNode)
pub fn push(&mut self, node: *mut _xmlNode)
Add a node to the set, maintaining document order and uniqueness.
Sourcepub unsafe fn to_raw(&self) -> *mut _xmlNodeSet
pub unsafe fn to_raw(&self) -> *mut _xmlNodeSet
Convert to raw C ABI node-set.
SAFETY: The returned pointer must be freed with xmlXPathFreeNodeSet or the owning XPath object must be freed.
Trait Implementations§
Auto Trait Implementations§
impl !Send for NodeSet
impl !Sync for NodeSet
impl Freeze for NodeSet
impl RefUnwindSafe for NodeSet
impl Unpin for NodeSet
impl UnsafeUnpin for NodeSet
impl UnwindSafe for NodeSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more