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: stream_tracking.rs
    path of file: ./repos/dim/dim-core/src
    
    the code of the file until where you have to start completion: use std::collections::HashMap;
use std::sync::Arc;

use crate::core::StateManager;
use crate::utils::ts_to_xml;
use tokio::sync::RwLock;
use uuid::Uuid;

use serde::Serialize;
use xmlwriter::*;

#[derive(Debug, Clone, Copy, Serialize)]
#[serde(rename_all = "lowercase")]
pub enum ContentType {
    Video,
    Audio,
    Subtitle,
}

impl std::fmt::Display for ContentType {
    fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(
            fmt,
            "{}",
            match *self 
    
    fn compile_sub(&self, w: &mut XmlWriter) {
        w.start_element("AdapationSet");
        w.write_attribute("mimeType", &self.mime);
        w.write_attribute("id", &self.set_id);

        if let Some(lang) = self.lang.as_ref() {
            w.write_attribute("lang", lang);
        }

        for (k, v) in self.args.iter() {
            w.write_attribute(k, v);
        }

        w.start_element("Representation");
        w.write_attribute("id", &self.id);
        w.write_attribute("bandwidth", &self.bandwidth);

        w.start_element("BaseURL");
        w.write_text(&self.chunk_path);
        w.end_element();
        w.end_element();
        w.end_element();
    }