Enum XmlOut

Source
pub enum XmlOut {
    Element(XmlElementRef),
    Fragment(XmlFragmentRef),
    Text(XmlTextRef),
}
Expand description

A return type from XML elements retrieval methods. It’s an enum of all supported values, that can be nested inside XmlElementRef. These are other XmlElementRefs, XmlFragmentRefs or XmlTextRef values.

Variants§

Implementations§

Source§

impl XmlOut

Source

pub fn as_ptr(&self) -> BranchPtr

Source

pub fn id(&self) -> BranchID

Source

pub fn into_xml_element(self) -> Option<XmlElementRef>

If current underlying XmlOut is wrapping a XmlElementRef, it will be returned. Otherwise, a None will be returned.

Source

pub fn into_xml_fragment(self) -> Option<XmlFragmentRef>

If current underlying XmlOut is wrapping a XmlFragmentRef, it will be returned. Otherwise, a None will be returned.

Source

pub fn into_xml_text(self) -> Option<XmlTextRef>

If current underlying XmlOut is wrapping a XmlTextRef, it will be returned. Otherwise, a None will be returned.

Trait Implementations§

Source§

impl AsRef<Branch> for XmlOut

Source§

fn as_ref(&self) -> &Branch

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for XmlOut

Source§

fn clone(&self) -> XmlOut

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for XmlOut

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl TryFrom<BranchPtr> for XmlOut

Source§

type Error = BranchPtr

The type returned in the event of a conversion error.
Source§

fn try_from(value: BranchPtr) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<ItemPtr> for XmlOut

Source§

type Error = ItemPtr

The type returned in the event of a conversion error.
Source§

fn try_from(value: ItemPtr) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Out> for XmlOut

Source§

type Error = Out

The type returned in the event of a conversion error.
Source§

fn try_from(value: Out) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryInto<XmlElementRef> for XmlOut

Source§

type Error = XmlOut

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<XmlElementRef, Self::Error>

Performs the conversion.
Source§

impl TryInto<XmlFragmentRef> for XmlOut

Source§

type Error = XmlOut

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<XmlFragmentRef, Self::Error>

Performs the conversion.
Source§

impl TryInto<XmlTextRef> for XmlOut

Source§

type Error = XmlOut

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<XmlTextRef, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl Freeze for XmlOut

§

impl !RefUnwindSafe for XmlOut

§

impl Send for XmlOut

§

impl Sync for XmlOut

§

impl Unpin for XmlOut

§

impl !UnwindSafe for XmlOut

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.