cobble_core/minecraft/models/
library_natives.rs1use crate::utils::Platform;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Debug, Deserialize, Serialize)]
6pub struct LibraryNatives {
7 pub linux: Option<String>,
9 pub windows: Option<String>,
11 pub osx: Option<String>,
13}
14
15impl LibraryNatives {
16 pub fn get_for_current_platform(&self) -> Option<String> {
21 let current = Platform::current();
22
23 match current {
24 Platform::Linux => self.linux.clone(),
25 Platform::Windows => self.windows.clone(),
26 Platform::MacOs => self.osx.clone(),
27 Platform::Other => None,
28 }
29 }
30}