pub struct Attr<'src> {
pub name: &'src str,
pub value: Cow<'src, str>,
}Expand description
A single attribute from a start tag, with a zero-copy value when possible.
Fields§
§name: &'src strSource-borrowed attribute name — XML names can’t contain entity refs, so no allocation is ever required.
value: Cow<'src, str>Attribute value. Borrowed from source when no entity references appeared in the literal; owned otherwise.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'src> Freeze for Attr<'src>
impl<'src> RefUnwindSafe for Attr<'src>
impl<'src> Send for Attr<'src>
impl<'src> Sync for Attr<'src>
impl<'src> Unpin for Attr<'src>
impl<'src> UnsafeUnpin for Attr<'src>
impl<'src> UnwindSafe for Attr<'src>
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