blob: 240b13fd0d72156867fe41c043d5e01540922390 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
use url::Url;
#[derive(Debug, Serialize, Deserialize)]
pub struct Configuration {
#[serde(with = "url_serde")]
#[serde(rename = "repology_url")]
repology_url: Url,
#[serde(rename = "whitelist")]
whitelist: Vec<String>,
#[serde(rename = "blacklist")]
blacklist: Vec<String>,
}
impl Configuration {
pub fn repology_url(&self) -> &Url {
&self.repology_url
}
pub fn whitelist(&self) -> &Vec<String> {
&self.whitelist
}
pub fn blacklist(&self) -> &Vec<String> {
&self.blacklist
}
}
|