use std::{fmt::Debug, marker::PhantomData}; use serde::{de::DeserializeOwned, Deserialize, Serialize}; use serde_json::Value; use thiserror::Error; use crate::{object::GiteratedObject, operation::GiteratedOperation}; use super::{AnySetting, Setting}; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct GetSetting { pub setting_name: String, } impl GiteratedOperation for GetSetting { fn operation_name() -> &'static str { "get_setting" } type Success = Value; type Failure = GetSettingError; } #[derive(Error, Debug, Serialize, Deserialize)] pub enum GetSettingError {} #[derive(Serialize, Deserialize, Debug, Clone)] pub struct SetSetting { pub setting_name: String, pub value: AnySetting, } impl GiteratedOperation for SetSetting { fn operation_name() -> &'static str { "set_setting" } type Success = (); type Failure = SetSettingError; } #[derive(Error, Debug, Serialize, Deserialize)] pub enum SetSettingError {}