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: config.rs
    path of file: ./repos/mirrord/mirrord/config/derive/src
    
    the code of the file until where you have to start completion: use proc_macro2::{Span, TokenStream};
use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt};
use quote::{quote, ToTokens};
use syn::{Data, DataStruct, DeriveInput, Fields, FieldsNamed, Ident, Visibility};

mod field;
mod flag;

use crate::config::{
    field::ConfigField,
    flag::{ConfigFlags, ConfigFlagsType},
};

#[derive(Debug)]
pub struct ConfigStruct {
    vis: Visibility,
    ident: Ident,
    fields: Vec<ConfigField>,
    source: Ident,
    flags: ConfigFlags,
}

impl ConfigStruct {
    pub fn new(input: DeriveInput) -> Result<Self, Diagnostic> {
        let DeriveInput {
            attrs,
            data,
            ident: source,
            vis,
            ..
        } = input;

        let flags = ConfigFlags::new(&attrs, ConfigFl
    
    pub fn new(input: DeriveInput) -> Result<Self, Diagnostic> {
        let DeriveInput {
            attrs,
            data,
            ident: source,
            vis,
            ..
        } = input;

        let flags = ConfigFlags::new(&attrs, ConfigFlagsType::Container)?;

        let fields = if let Data::Struct(DataStruct {
            fields: Fields::Named(FieldsNamed { named, .. }),
            ..
        }) = data
        {
            Ok(named
                .into_iter()
                .map(ConfigField::try_from)
                .collect::<Result<_, _>>()?)
        } else {
            Err(source
                .span()
                .error("Enums, Unions, and Unnamed Structs are not supported"))
        }?;

        let ident = flags
            .map_to
            .clone()
            .unwrap_or_else(|| Ident::new(&format!("File{}", &source), Span::call_site()));

        Ok(ConfigStruct {
            vis,
            source,
            ident,
            fields,
            flags,
        })
    }