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

pub struct Attribute<'a> {
    pub key: &'a [u8],
    pub value: &'a [u8],
}

A struct representing a key/value for a xml attribute

Parses either key="value" or key='value'

Fields

the key to uniquely define the attribute

the value

Methods

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

unescapes the value

unescapes then decode the value

for performance reasons (could avoid allocating a String), it might be wiser to manually use 1. Attributes::unescaped_value() 2. Reader::decode(...)

Trait Implementations

impl<'a> Debug for Attribute<'a>
[src]

Formats the value using the given formatter.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> PartialEq for Attribute<'a>
[src]

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

This method tests for !=.

impl<'a> From<(&'a [u8], &'a [u8])> for Attribute<'a>
[src]

Performs the conversion.

impl<'a> From<(&'a str, &'a str)> for Attribute<'a>
[src]

Performs the conversion.