ig_client/storage/
config.rs

1use serde::Deserialize;
2use std::fmt;
3
4/// Configuration for database connections
5#[derive(Debug, Deserialize, Clone)]
6pub struct DatabaseConfig {
7    /// Database connection URL
8    pub url: String,
9    /// Maximum number of connections in the connection pool
10    pub max_connections: u32,
11}
12
13impl fmt::Display for DatabaseConfig {
14    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
15        write!(
16            f,
17            "{{\"url\":\"{}\",\"max_connections\":{}}}",
18            self.url, self.max_connections
19        )
20    }
21}