diff --git a/src/app.rs b/src/app.rs index 750a5f9..9bd6574 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,22 +1,22 @@ use std::collections::HashMap; -use serde::Deserialize; +use serde::{Deserialize, Serialize}; use crate::system::{System, SystemTweaks}; -#[derive(PartialEq, Debug, Deserialize)] +#[derive(PartialEq, Debug, Deserialize, Serialize)] pub struct TweakSettings { pub gamemode: Option, pub mangohud: Option, } -#[derive(Debug, Deserialize)] +#[derive(Debug, Deserialize, Serialize)] pub struct Issue { pub description: String, pub solution: Option, } -#[derive(Debug, Deserialize)] +#[derive(Debug, Deserialize, Serialize)] pub struct Tweaks { pub tricks: Vec, pub env: HashMap, @@ -25,7 +25,7 @@ pub struct Tweaks { pub system: System, } -#[derive(Debug, Deserialize)] +#[derive(Debug, Deserialize, Serialize)] pub struct App { pub id: String, pub name: String, diff --git a/src/lib.rs b/src/lib.rs index 6d6fd6d..2ad7506 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,7 @@ use app::App; use log::trace; use reqwest::{StatusCode, Url}; -use serde::{de::DeserializeOwned, Deserialize}; +use serde::{de::DeserializeOwned, Deserialize, Serialize}; pub mod app; pub mod system; @@ -10,14 +10,14 @@ pub struct Protontweaks { url: &'static str, } -#[derive(Debug, Deserialize)] +#[derive(Debug, Deserialize, Serialize)] pub struct AppsList { pub sha: String, pub short_sha: String, pub apps: Vec, } -#[derive(Debug, Deserialize)] +#[derive(Debug, Deserialize, Serialize)] pub struct MicroApp { pub id: String, pub name: String, diff --git a/src/system.rs b/src/system.rs index e8b1d22..e9a4072 100644 --- a/src/system.rs +++ b/src/system.rs @@ -1,22 +1,22 @@ use std::collections::HashMap; use log::info; -use serde::Deserialize; +use serde::{Deserialize, Serialize}; use crate::app::TweakSettings; -#[derive(Debug, Deserialize)] +#[derive(Debug, Deserialize, Serialize)] pub struct System { pub gpu_driver: GpuDriver, } -#[derive(Debug, Deserialize)] +#[derive(Debug, Deserialize, Serialize)] pub struct GpuDriver { pub amd: Option, pub nvidia: Option, } -#[derive(PartialEq, Debug, Deserialize)] +#[derive(PartialEq, Debug, Deserialize, Serialize)] pub struct SystemTweaks { pub tricks: Vec, pub env: HashMap,