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
key: &'a [u8]
the key to uniquely define the attribute
value: &'a [u8]
the value
Methods
impl<'a> Attribute<'a>
[src]
fn unescaped_value(&self) -> Result<Cow<[u8]>>
unescapes the value
fn unescape_and_decode_value<B: BufRead>(&self,
reader: &Reader<B>)
-> Result<String>
reader: &Reader<B>)
-> Result<String>
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]
impl<'a> Clone for Attribute<'a>
[src]
fn clone(&self) -> Attribute<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'a> PartialEq for Attribute<'a>
[src]
fn eq(&self, __arg_0: &Attribute<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Attribute<'a>) -> bool
This method tests for !=
.