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: mod.rs
    path of file: ./repos/rusty-gql/cli/src/code_generate/directive
    
    the code of the file until where you have to start completion: use std::{collections::HashMap, io::Error};

use codegen::Scope;
use futures_util::future::try_join_all;
use heck::{ToSnakeCase, ToUpperCamelCase};
use rusty_gql::DirectiveDefinition;

use crate::code_generate::{use_gql_definitions, FileDefinition};

use super::{create_file, mod_file::ModFile, path_str, CreateFile};

pub struct DirectiveFile<'a> {
    pub def: &'a DirectiveDefinition,
    pub path: String,
    pub filename: String,
}

impl<'a> FileDefinition for DirectiveFile<'a> {
    fn content(&self) -> String {
        let mut scope = Scope::new();
        let struct_name = &self.def.name.to_upper_camel_case();
        scope.new_struct(struct_name).vis("pub");
        let new_impl = scope.new_impl(struct_name);
        let new_fn = new_impl.new_fn("new");
        new_fn.ret("Box<dyn CustomDirective>");
        new_fn.line(format!("Box::new({} {{}})", struct_name));

  
    
    fn content(&self) -> String {
        let mut scope = Scope::new();
        let struct_name = &self.def.name.to_upper_camel_case();
        scope.new_struct(struct_name).vis("pub");
        let new_impl = scope.new_impl(struct_name);
        let new_fn = new_impl.new_fn("new");
        new_fn.ret("Box<dyn CustomDirective>");
        new_fn.line(format!("Box::new({} {{}})", struct_name));

        let directive_impl = scope.new_impl(struct_name);
        directive_impl.impl_trait("CustomDirective");
        directive_impl.r#macro("#[async_trait::async_trait]");

        let resolve_fn = directive_impl.new_fn("resolve_field");
        resolve_fn.set_async(true);
        resolve_fn.arg_ref_self();
        resolve_fn.arg("ctx", "&Context<'_>");
        resolve_fn.arg("directive_args", "&BTreeMap<String, GqlValue>");
        resolve_fn.arg("resolve_fut", "ResolveFut<'_>");
        resolve_fn.ret("ResolverResult<Option<GqlValue>>");
        resolve_fn.line("todo!()");

        format!(
            "{}\nuse std::collections::BTreeMap;\n\n{}",
            use_gql_definitions(),
            scope.to_string()
        )
    }