Struct quick_xml::events::attributes::Attributes[][src]

pub struct Attributes<'a> { /* fields omitted */ }

Iterator over XML attributes.

Yields Result<Attribute>. An Err will be yielded if an attribute is malformed or duplicated. The duplicate check can be turned off by calling with_checks(false).

Implementations

impl<'a> Attributes<'a>[src]

pub fn new(buf: &'a [u8], pos: usize) -> Attributes<'a>

Notable traits for Attributes<'a>

impl<'a> Iterator for Attributes<'a> type Item = Result<Attribute<'a>>;
[src]

Creates a new attribute iterator from a buffer.

pub fn html(buf: &'a [u8], pos: usize) -> Attributes<'a>

Notable traits for Attributes<'a>

impl<'a> Iterator for Attributes<'a> type Item = Result<Attribute<'a>>;
[src]

Creates a new attribute iterator from a buffer, allowing HTML attribute syntax.

pub fn with_checks(&mut self, val: bool) -> &mut Attributes<'a>

Notable traits for Attributes<'a>

impl<'a> Iterator for Attributes<'a> type Item = Result<Attribute<'a>>;
[src]

Changes whether attributes should be checked for uniqueness.

The XML specification requires attribute keys in the same element to be unique. This check can be disabled to improve performance slightly.

(true by default)

Trait Implementations

impl<'a> Clone for Attributes<'a>[src]

impl<'a> Iterator for Attributes<'a>[src]

type Item = Result<Attribute<'a>>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a> RefUnwindSafe for Attributes<'a>

impl<'a> Send for Attributes<'a>

impl<'a> Sync for Attributes<'a>

impl<'a> Unpin for Attributes<'a>

impl<'a> UnwindSafe for Attributes<'a>

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<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.