teo_runtime/config/
server.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use serde::Serialize;

#[derive(Debug, Serialize, Clone)]
pub struct Server {
    pub bind: (String, u16),
    #[serde(rename = "pathPrefix")]
    pub path_prefix: Option<String>,
}

impl Server {

    pub fn bind(&self) -> (&str, u16) {
        (&self.bind.0, self.bind.1)
    }

    pub fn path_prefix(&self) -> Option<&str> {
        self.path_prefix.as_deref()
    }
}