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: docstring.rs
    path of file: ./repos/sway/forc-plugins/forc-doc/src/render/util/format
    
    the code of the file until where you have to start completion: //! Rendering and formatting for Sway doc attributes.
use crate::render::util::format::constant::*;
use comrak::{markdown_to_html, ComrakOptions};
use std::fmt::Write;
use sway_core::transform::{AttributeKind, AttributesMap};
use sway_lsp::utils::markdown::format_docs;

pub(crate) trait DocStrings {
    fn to_html_string(&self) -> String;
    fn to_raw_string(&self) -> String;
}
/// Creates an HTML String from an [AttributesMap]
impl DocStr
    
    fn to_raw_string(&self) -> String {
        let attributes = self.get(&AttributeKind::DocComment);
        let mut docs = String::new();

        if let Some(vec_attrs) = attributes {
            for arg in vec_attrs.iter().flat_map(|attribute| &attribute.args) {
                writeln!(docs, "{}", arg.name.as_str()).expect(
                    "problem appending `arg.name.as_str()` to `docs` with `writeln` macro.",
                );
            }
        }
        docs
    }