pub struct HTMLTag<'a> { /* private fields */ }Expand description
An element with its name, attributes, children and source bytes.
Implementations§
Source§impl<'a> HTMLTag<'a>
impl<'a> HTMLTag<'a>
Sourcepub const fn attributes(&self) -> &Attributes<'a>
pub const fn attributes(&self) -> &Attributes<'a>
Returns the attributes of the element.
Sourcepub const fn attributes_mut(&mut self) -> &mut Attributes<'a>
pub const fn attributes_mut(&mut self) -> &mut Attributes<'a>
Returns the attributes of the element, for an edit.
Sourcepub const fn raw(&self) -> &Bytes<'a>
pub const fn raw(&self) -> &Bytes<'a>
Returns the source bytes of the element, from its start tag to its end tag.
Sourcepub fn boundaries(&self, parser: &Parser<'a>) -> (usize, usize)
pub fn boundaries(&self, parser: &Parser<'a>) -> (usize, usize)
Returns the first and the last byte offset of the element in the source.
Sourcepub fn inner_text<'p>(&self, parser: &'p Parser<'a>) -> Cow<'p, str>
pub fn inner_text<'p>(&self, parser: &'p Parser<'a>) -> Cow<'p, str>
Returns the text of every descendant text node, joined.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for HTMLTag<'a>
impl<'a> Freeze for HTMLTag<'a>
impl<'a> Move for HTMLTag<'a>
impl<'a> RefUnwindSafe for HTMLTag<'a>
impl<'a> Send for HTMLTag<'a>
impl<'a> Sync for HTMLTag<'a>
impl<'a> Unpin for HTMLTag<'a>
impl<'a> UnsafeUnpin for HTMLTag<'a>
impl<'a> UnwindSafe for HTMLTag<'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