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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
use crate::prelude::*; #[derive(Debug, Deserialize)] pub struct UpdateInfo { #[serde(default)] #[serde(rename = "update")] pub updates: Vec<Update> } #[derive(Debug, Deserialize)] pub struct Update { #[serde(rename = "type")] pub typ: String, pub from: String, pub status: String, pub id: String, pub title: String, pub summary: Option<String>, pub rights: Option<String>, pub description: Option<String>, pub release: Option<String>, pub solution: Option<String>, #[serde(default)] pub severity: Option<String>, pub issued: Date, pub updated: Date, pub references: Vec<Reference>, pub pkglist: Vec<PkgList>, } #[derive(Debug, Deserialize)] pub struct Date { pub date: String } #[derive(Debug, Deserialize)] pub struct Reference { pub href: Option<String>, pub id: Option<String>, #[serde(rename = "type")] pub typ: Option<String>, pub title: Option<String>, } #[derive(Debug, Deserialize)] pub struct PkgList { pub collection: Vec<Collection> } #[derive(Debug, Deserialize)] pub struct Collection { pub name: String, pub module: Option<Module>, pub package: Vec<Package>, } #[derive(Debug, Deserialize)] pub struct Module { pub name : String, pub stream: String, pub arch: String, pub version: String, pub context: String, } #[derive(Debug, Deserialize)] pub struct Package { pub name: String, pub epoch: String, pub version: String, pub release: String, pub arch: String, }