Loading RustViz Engine...
Create a Parser struct holding &'a str without cloning or allocating heap memory.
This problem is currently in blueprint template mode. Once the concept foundation is finalized, live in-browser WebAssembly compilation and test assertion runners will be enabled here.
pub struct Highlight<'a> {
pub text: &'a str,
pub tag: &'a str,
}
impl<'a> Highlight<'a> {
pub fn render(&self) -> String {
format!("<{}>{}</{}>", self.tag, self.text, self.tag)
}
}