Struct html5tokenizer::token::Attribute
source · pub struct Attribute<'a> { /* private fields */ }
Expand description
An HTML attribute borrowed from an AttributeMap
.
Implementations§
source§impl<'a> Attribute<'a>
impl<'a> Attribute<'a>
sourcepub fn name(&self) -> &'a str
pub fn name(&self) -> &'a str
Returns the attribute name. Uppercase ASCII characters (A-Z) have been converted to lowercase.
sourcepub fn value(&self) -> &'a str
pub fn value(&self) -> &'a str
Returns the attribute value. Character references have been resolved.
sourcepub fn trace_idx(&self) -> Option<AttributeTraceIdx>
pub fn trace_idx(&self) -> Option<AttributeTraceIdx>
Returns the index of the corresponding AttributeTrace
in the
attribute_traces
field of StartTagTrace
, in case this attribute
was present in the source and the Emitter
has tracked that.
Trait Implementations§
source§impl<'a> PartialEq for Attribute<'a>
impl<'a> PartialEq for Attribute<'a>
impl<'a> Eq for Attribute<'a>
impl<'a> StructuralEq for Attribute<'a>
impl<'a> StructuralPartialEq for Attribute<'a>
Auto Trait Implementations§
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