use anyhow::Result;
use serde::Deserialize;
#[derive(Debug, Deserialize, Clone)]
pub struct BaseConfig {
pub base: Base,
pub proxy_listen: netxserver::prelude::ServerOption,
pub master: netxclient::prelude::ServerOption,
pub drawing_table: String,
}
impl BaseConfig {
pub fn load_config(content: &str) -> Result<Self> {
Ok(toml::from_str(content)?)
}
}
#[derive(Deserialize, Debug, Clone)]
pub struct Base {
pub server_id: u32,
pub peer_clean_timeout_sec: i64,
pub account_cache_cleans_timeout_sec: i64,
}