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.
Sourcepub fn streaming_before(
&mut self,
string_writer: Box<dyn StreamingHandler + Send>,
)
pub fn streaming_before( &mut self, string_writer: Box<dyn StreamingHandler + Send>, )
Inserts content from a StreamingHandler
before the end tag.
Consequent calls to the method append to the previously inserted content.
Use the streaming!
macro to make a StreamingHandler
from a closure.
Sourcepub fn streaming_after(
&mut self,
string_writer: Box<dyn StreamingHandler + Send>,
)
pub fn streaming_after( &mut self, string_writer: Box<dyn StreamingHandler + Send>, )
Inserts content from a StreamingHandler
after the end tag.
Consequent calls to the method prepend to the previously inserted content.
Use the streaming!
macro to make a StreamingHandler
from a closure.
Sourcepub fn streaming_replace(
&mut self,
string_writer: Box<dyn StreamingHandler + Send>,
)
pub fn streaming_replace( &mut self, string_writer: Box<dyn StreamingHandler + Send>, )
Replaces the end tag with content from a StreamingHandler
.
Consequent calls to the method overwrite previous replacement content.
Use the streaming!
macro to make a StreamingHandler
from a closure.