Skip to main content

EventInto

Enum EventInto 

Source
pub enum EventInto<'src> {
    StartElement {
        name: Cow<'src, str>,
    },
    EndElement {
        name: Cow<'src, str>,
    },
    Text(Cow<'src, str>),
    CData(Cow<'src, str>),
    Comment(Cow<'src, str>),
    Pi {
        target: Cow<'src, str>,
        content: Cow<'src, str>,
    },
    EntityRef {
        name: Cow<'src, str>,
    },
    Eof,
}
Expand description

A streaming XML event with attributes already parsed into a caller-owned buffer.

Returned by XmlReader::next_into. The buffer the caller passes is cleared on each call and filled with the start tag’s attributes, allowing buffer reuse across many events. For lazy attribute access without a buffer see XmlReader::next which returns Event.

Variants§

§

StartElement

An opening (or empty-element) start tag. Attributes are in the caller-owned buffer passed to XmlReader::next_into.

Fields

§name: Cow<'src, str>
§

EndElement

A closing tag. Emitted once for each StartElement, including for empty elements.

Fields

§name: Cow<'src, str>
§

Text(Cow<'src, str>)

§

CData(Cow<'src, str>)

§

Comment(Cow<'src, str>)

§

Pi

Fields

§target: Cow<'src, str>
§content: Cow<'src, str>
§

EntityRef

An unresolved entity reference (&name;) — emitted only when ParseOptions::resolve_entities is false.

Fields

§name: Cow<'src, str>
§

Eof

Trait Implementations§

Source§

impl<'src> Debug for EventInto<'src>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'src> Freeze for EventInto<'src>

§

impl<'src> RefUnwindSafe for EventInto<'src>

§

impl<'src> Send for EventInto<'src>

§

impl<'src> Sync for EventInto<'src>

§

impl<'src> Unpin for EventInto<'src>

§

impl<'src> UnsafeUnpin for EventInto<'src>

§

impl<'src> UnwindSafe for EventInto<'src>

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> 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> Same for T

Source§

type Output = T

Should always be Self
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.