use serde::Deserialize;
#[derive(Debug, Deserialize)]
pub struct ClientConfig {
pub base_url: String,
}
impl ClientConfig {
pub fn from_file(path: &str) -> Result<Self, Box<dyn std::error::Error>> {
let content = std::fs::read_to_string(path)?;
let config: Self = serde_yaml::from_str(&content)?;
Ok(config)
}
}