derust/httpx/config.rs
1use serde::{Deserialize, Serialize};
2
3pub const DEFAULT_PORT: u16 = 9011;
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
6pub struct Config {
7 port: u16,
8}
9
10impl Config {
11 pub fn port(&self) -> u16 {
12 self.port
13 }
14}
15
16impl Default for Config {
17 fn default() -> Self {
18 Self { port: DEFAULT_PORT }
19 }
20}