use serde::{de::DeserializeOwned, Deserialize, Serialize}; use serde_json::Value; pub trait Setting: Serialize + DeserializeOwned { fn name() -> &'static str; } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct AnySetting(Value); impl Setting for AnySetting { fn name() -> &'static str { "any" } } #[derive(Debug, Serialize, Deserialize)] pub struct UserBio(pub String); impl Setting for UserBio { fn name() -> &'static str { "Bio" } } #[derive(Debug, Serialize, Deserialize)] pub struct UserDisplayName(pub String); impl Setting for UserDisplayName { fn name() -> &'static str { "Display Name" } } #[derive(Debug, Serialize, Deserialize)] pub struct UserDisplayImage(pub String); impl Setting for UserDisplayImage { fn name() -> &'static str { "Profile Image" } }