pub struct Attribute<'a> { /* private fields */ }Expand description
A reference to an XML attribute within a document.
This struct provides access to an attribute’s name and value by combining a reference to the document with attribute information.
Implementations§
Source§impl<'xml> Attribute<'xml>
impl<'xml> Attribute<'xml>
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
Returns the name of the attribute as a string slice.
§Returns
A string slice containing the attribute name
Sourcepub fn name_bytes(&self) -> &[u8] ⓘ
pub fn name_bytes(&self) -> &[u8] ⓘ
Returns the name of the attribute as a byte slice.
§Returns
A byte slice containing the attribute name
Sourcepub fn value(&self) -> &'xml str
pub fn value(&self) -> &'xml str
Returns the value of the attribute as a string slice.
§Returns
A string slice containing the attribute value
Sourcepub fn value_bytes(&self) -> &[u8] ⓘ
pub fn value_bytes(&self) -> &[u8] ⓘ
Returns the vale of the attribute as a byte slice.
§Returns
A byte slice containing the attribute value
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Attribute<'a>
impl<'a> RefUnwindSafe for Attribute<'a>
impl<'a> Send for Attribute<'a>
impl<'a> Sync for Attribute<'a>
impl<'a> Unpin for Attribute<'a>
impl<'a> UnwindSafe for Attribute<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more