[][src]Enum magnesium::XmlElement

pub enum XmlElement<'s> {
    StartTag {
        name: &'s str,
        attrs: &'s str,
    },
    EndTag {
        name: &'s str,
    },
    EmptyTag {
        name: &'s str,
        attrs: &'s str,
    },
    Text(&'s str),
    Comment(&'s str),
}

An element within an XML structure.

Variants

StartTag

An opening tag with a name and some attributes.

If the XML is well formed, then there will be an EndTag with a matching name later on. In between there can be any number of sub-entries.

Fields of StartTag

name: &'s str

Name of this tag.

attrs: &'s str

Attribute string.

Parse this with a TagAttributeIterator.

EndTag

Closes the StartTag of the same name.

Fields of EndTag

name: &'s str

Name of the tag being closed.

EmptyTag

An "empty" tag has no inner content, it opens and immediate closes.

Fields of EmptyTag

name: &'s str

The tag's name.

attrs: &'s str

The tag's attribute string.

Parse this with a TagAttributeIterator.

Text(&'s str)

Text between tags, including Cdata entries.

Comment(&'s str)

Comments between tags in <!-- and -->.

Trait Implementations

impl<'s> Clone for XmlElement<'s>[src]

impl<'s> Copy for XmlElement<'s>[src]

impl<'s> Debug for XmlElement<'s>[src]

impl<'s> Eq for XmlElement<'s>[src]

impl<'s> Hash for XmlElement<'s>[src]

impl<'s> PartialEq<XmlElement<'s>> for XmlElement<'s>[src]

impl<'s> StructuralEq for XmlElement<'s>[src]

impl<'s> StructuralPartialEq for XmlElement<'s>[src]

Auto Trait Implementations

impl<'s> Send for XmlElement<'s>

impl<'s> Sync for XmlElement<'s>

impl<'s> Unpin for XmlElement<'s>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.