Struct lol_html::html_content::EndTag
source · pub struct EndTag<'i> { /* private fields */ }
Expand description
An HTML end tag rewritable unit.
Exposes API for examination and modification of a parsed HTML end tag.
Implementations§
source§impl<'i> EndTag<'i>
impl<'i> EndTag<'i>
sourcepub fn name_preserve_case(&self) -> String
pub fn name_preserve_case(&self) -> String
Returns the name of the tag, preserving its case.
sourcepub fn set_name_str(&mut self, name: String)
pub fn set_name_str(&mut self, name: String)
Sets the name of the tag by encoding the given string.
sourcepub fn before(&mut self, content: &str, content_type: ContentType)
pub fn before(&mut self, content: &str, content_type: ContentType)
Inserts content
before the end tag.
Consequent calls to the method append content
to the previously inserted content.
sourcepub fn after(&mut self, content: &str, content_type: ContentType)
pub fn after(&mut self, content: &str, content_type: ContentType)
Inserts content
after the end tag.
Consequent calls to the method prepend content
to the previously inserted content.
sourcepub fn replace(&mut self, content: &str, content_type: ContentType)
pub fn replace(&mut self, content: &str, content_type: ContentType)
Replaces the end tag with content
.
Consequent calls to the method overwrite previous replacement content.
Trait Implementations§
Auto Trait Implementations§
impl<'i> RefUnwindSafe for EndTag<'i>
impl<'i> Send for EndTag<'i>
impl<'i> Sync for EndTag<'i>
impl<'i> Unpin for EndTag<'i>
impl<'i> UnwindSafe for EndTag<'i>
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