pub struct ElementRef<'document, S> { /* private fields */ }Expand description
A borrowed view of an element node.
Implementations§
Source§impl<'document, S: AsRef<[u8]>> ElementRef<'document, S>
impl<'document, S: AsRef<[u8]>> ElementRef<'document, S>
pub fn id(self) -> NodeId
pub fn parent(self) -> Option<ElementRef<'document, S>>
pub fn qualified_name(self) -> &'document str
pub fn prefix(self) -> Option<&'document str>
pub fn name(self) -> &'document str
pub fn namespace(self) -> Option<&'document str>
pub fn raw_xml(self) -> &'document [u8] ⓘ
pub fn attributes(self) -> Attributes<'document, S> ⓘ
pub fn attribute(self, qualified_name: &str) -> Option<&'document str>
pub fn attribute_ns( self, name: &str, namespace: Option<&str>, ) -> Option<&'document str>
pub fn children(self) -> Children<'document, S> ⓘ
pub fn child_elements(self) -> ChildElements<'document, S> ⓘ
pub fn get_child(self, name: &str) -> Option<ElementRef<'document, S>>
pub fn get_child_ns( self, name: &str, namespace: &str, ) -> Option<ElementRef<'document, S>>
pub fn descendants(self) -> DescendantElements<'document, S> ⓘ
pub fn text(self) -> Option<Cow<'document, str>>
Trait Implementations§
Source§impl<S> Clone for ElementRef<'_, S>
impl<S> Clone for ElementRef<'_, S>
impl<S> Copy for ElementRef<'_, S>
Auto Trait Implementations§
impl<'document, S> Freeze for ElementRef<'document, S>
impl<'document, S> RefUnwindSafe for ElementRef<'document, S>where
S: RefUnwindSafe,
impl<'document, S> Send for ElementRef<'document, S>where
S: Sync,
impl<'document, S> Sync for ElementRef<'document, S>where
S: Sync,
impl<'document, S> Unpin for ElementRef<'document, S>
impl<'document, S> UnsafeUnpin for ElementRef<'document, S>
impl<'document, S> UnwindSafe for ElementRef<'document, S>where
S: RefUnwindSafe,
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