pub enum XmlNode {
Element(XmlElementRef),
Fragment(XmlFragmentRef),
Text(XmlTextRef),
}Expand description
An return type from XML elements retrieval methods. It’s an enum of all supported values, that can be nested inside of XmlElementRef. These are other XmlElementRefs, XmlFragmentRefs or XmlTextRef values.
Variants§
Implementations§
source§impl XmlNode
impl XmlNode
pub fn as_ptr(&self) -> BranchPtr
pub fn id(&self) -> BranchID
sourcepub fn into_xml_element(self) -> Option<XmlElementRef>
pub fn into_xml_element(self) -> Option<XmlElementRef>
If current underlying XmlNode is wrapping a XmlElementRef, it will be returned.
Otherwise, a None will be returned.
sourcepub fn into_xml_fragment(self) -> Option<XmlFragmentRef>
pub fn into_xml_fragment(self) -> Option<XmlFragmentRef>
If current underlying XmlNode is wrapping a XmlFragmentRef, it will be returned.
Otherwise, a None will be returned.
sourcepub fn into_xml_text(self) -> Option<XmlTextRef>
pub fn into_xml_text(self) -> Option<XmlTextRef>
If current underlying XmlNode is wrapping a XmlTextRef, it will be returned.
Otherwise, a None will be returned.
Trait Implementations§
source§impl TryInto<XmlElementRef> for XmlNode
impl TryInto<XmlElementRef> for XmlNode
source§impl TryInto<XmlFragmentRef> for XmlNode
impl TryInto<XmlFragmentRef> for XmlNode
Auto Trait Implementations§
impl Freeze for XmlNode
impl !RefUnwindSafe for XmlNode
impl !Send for XmlNode
impl !Sync for XmlNode
impl Unpin for XmlNode
impl !UnwindSafe for XmlNode
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