You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: tokens.rs
    path of file: ./repos/rustodon/lib/posticle/src
    
    the code of the file until where you have to start completion: use crate::grammar::Rule;
use pest::iterators::Pair;

fn html_escape(text: &str) -> String {
    text.replace('&', "&amp;")
        .replace('"', "&quot")
        .replace('<', "&lt;")
        .replace('>', "&gt;")
}

#[derive(Clone, Debug, PartialEq)]
/// A textual emoticon.
pub struct Emoticon {
    pub name: String,
}

impl Emoticon {
    pub fn render(&self, output: &mut String) {
        output.push_str(&format!(":{}:", html_escape(&self.name)));
    }
}

#[derive(Clone, Debug, PartialEq)]
/// A hashtag.
    
    pub fn render(&self, output: &mut String) {
        output.push_str("<");
        output.push_str(&self.name);

        if !self.attributes.is_empty() {
            for (name, value) in &self.attributes {
                output.push_str(" ");
                output.push_str(name);
                output.push_str("=\"");
                output.push_str(&html_escape(value));
                output.push_str("\"");
            }
        }

        output.push_str(">");

        if !self.children.is_empty() {
            for child in &self.children {
                child.render(output);
            }
        }

        output.push_str("</");
        output.push_str(&self.name);
        output.push_str(">");
    }