Enum quick_xml::events::Event[][src]

pub enum Event<'a> {
    Start(BytesStart<'a>),
    End(BytesEnd<'a>),
    Empty(BytesStart<'a>),
    Text(BytesText<'a>),
    Comment(BytesText<'a>),
    CData(BytesText<'a>),
    Decl(BytesDecl<'a>),
    PI(BytesText<'a>),
    DocType(BytesText<'a>),
    Eof,
}
Expand description

Event emitted by Reader::read_event.

Variants

Start

Start tag (with attributes) <tag attr="value">.

Tuple Fields of Start

0: BytesStart<'a>
End

End tag </tag>.

Tuple Fields of End

0: BytesEnd<'a>
Empty

Empty element tag (with attributes) <tag attr="value" />.

Tuple Fields of Empty

0: BytesStart<'a>
Text

Character data between Start and End element.

Tuple Fields of Text

0: BytesText<'a>
Comment

Comment <!-- ... -->.

Tuple Fields of Comment

0: BytesText<'a>
CData

CData <![CDATA[...]]>.

Tuple Fields of CData

0: BytesText<'a>
Decl

XML declaration <?xml ...?>.

Tuple Fields of Decl

0: BytesDecl<'a>
PI

Processing instruction <?...?>.

Tuple Fields of PI

0: BytesText<'a>
DocType

Doctype <!DOCTYPE...>.

Tuple Fields of DocType

0: BytesText<'a>
Eof

End of XML document.

Implementations

Converts the event to an owned version, untied to the lifetime of buffer used when reading but incurring a new, separate allocation.

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.