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
29
30
use crate::utils::os::Platform;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct Natives {
pub linux: Option<String>,
pub windows: Option<String>,
pub osx: Option<String>,
}
impl Natives {
pub fn get_for_current_platform(&self) -> Option<String> {
let current = Platform::current();
match current {
Platform::Linux => self.linux.clone(),
Platform::Windows => self.windows.clone(),
Platform::MacOs => self.osx.clone(),
Platform::Other => None,
}
}
}