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: structure.rs
    path of file: ./repos/actix-swagger/swagg/src/printer/api
    
    the code of the file until where you have to start completion: use crate::printer::Printable;
use inflections::Inflect;
use quote::{format_ident, quote};
use regex::Regex;

/// Create PascalName from string
pub fn to_struct_name(string: String) -> String {
    let re_name = Regex::new(r"[^\w_\-\d]+").expect("re_name invalid regex");

    re_name
        .replace_all(string.to_pascal_case()
    
    fn default_struct() {
        assert_snapshot!(shot(ApiStruct::default()), @r###"
        pub struct Api {
            api: actix_swagger::Api,
        }
        impl Api {
            pub fn new() -> Self {
                Self {
                    api: actix_swagger::Api::new(),
                }
            }
        }
        impl Default for Api {
            fn default() -> Self {
                let api = Self::new();
                api
            }
        }
        impl actix_web::dev::HttpServiceFactory for Api {
            fn register(self, config: &mut actix_web::dev::AppService) {
                self.api.register(config);
            }
        }
        "###);
    }