use serde::Deserialize; #[derive(Deserialize)] pub struct VanillaVersions { // pub latest: VanillaLatestVersion, pub versions: Vec, } // #[derive(Deserialize)] // pub struct VanillaLatestVersion { // pub release: String, // pub snapshot: String, // } #[derive(Deserialize, PartialEq)] #[serde(rename_all = "snake_case")] pub enum VanillaVersionType { Snapshot, Release, OldBeta, OldAlpha, } #[derive(Deserialize)] pub struct VanillaVersion { pub id: String, #[serde(rename = "type")] pub version_type: VanillaVersionType, pub url: String, } #[derive(Deserialize)] pub struct VanillaVersionDetail { pub downloads: VanillaVersionDownloads, } #[derive(Deserialize)] pub struct VanillaVersionDownloads { // pub client: VanillaVersionDownloadItem, pub server: VanillaVersionDownloadItem, } #[derive(Deserialize)] pub struct VanillaVersionDownloadItem { pub sha1: String, pub size: u64, pub url: String, }