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/martin/martin/src
    
    the code of the file until where you have to start completion: use std::collections::HashMap;
use std::ffi::OsStr;
use std::fs::File;
use std::future::Future;
use std::io::prelude::*;
use std::path::{Path, PathBuf};
use std::pin::Pin;

use futures::future::try_join_all;
use log::info;
use serde::{Deserialize, Serialize};
use subst::VariableMap;

#[cfg(any(feature = "mbtiles", feature = "pmtiles", feature = "sprites"))]
use crate::file_config::FileConfigEnum;
#[cfg(feature = "fonts")]
use crate::fonts::FontSources;
use crate::source::{TileInfoSources, TileSources};
#[cfg(feature = "sprites")]
use crate::sprites::{SpriteConfig, SpriteSources};
use crate::srv::{SrvConfig, RESERVED_KEYWORDS};
use crate::utils::{parse_base_path, CacheValue, MainCache, OptMainCache};
use crate::MartinError::{ConfigLoadError, ConfigParseError, ConfigWriteError, NoSources};
use crate::{IdResolver, MartinResult, OptOneMany};

pub type UnrecognizedValues = HashMap<String, serde_yaml::Value>;

pub struct ServerState {
    pub cache: OptMainCache,
    pub tiles: TileSources,
    #[cfg(feature = "sprites")]
    pub sprites: SpriteSources,
    #[cfg(feature = "fonts")]
    pub fonts: FontSources,
}

#[serde_with::skip_serializing_none]
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
pub struct Config 
    
    pub fn finalize(&mut self) -> MartinResult<UnrecognizedValues> {
        let mut res = UnrecognizedValues::new();
        copy_unrecognized_config(&mut res, "", &self.unrecognized);

        if let Some(path) = &self.srv.base_path {
            self.srv.base_path = Some(parse_base_path(path)?);
        }

        #[cfg(feature = "postgres")]
        for pg in self.postgres.iter_mut() {
            res.extend(pg.finalize()?);
        }

        #[cfg(feature = "pmtiles")]
        res.extend(self.pmtiles.finalize("pmtiles.")?);

        #[cfg(feature = "mbtiles")]
        res.extend(self.mbtiles.finalize("mbtiles.")?);

        #[cfg(feature = "sprites")]
        res.extend(self.sprites.finalize("sprites.")?);

        // TODO: support for unrecognized fonts?
        // res.extend(self.fonts.finalize("fonts.")?);

        let is_empty = true;

        #[cfg(feature = "postgres")]
        let is_empty = is_empty && self.postgres.is_empty();

        #[cfg(feature = "pmtiles")]
        let is_empty = is_empty && self.pmtiles.is_empty();

        #[cfg(feature = "mbtiles")]
        let is_empty = is_empty && self.mbtiles.is_empty();

        #[cfg(feature = "sprites")]
        let is_empty = is_empty && self.sprites.is_empty();

        #[cfg(feature = "fonts")]
        let is_empty = is_empty && self.fonts.is_empty();

        if is_empty {
            Err(NoSources)
        } else {
            Ok(res)
        }
    }