use std::fmt::Display; use serde::{Deserialize, Serialize}; use crate::value::GiteratedObjectValue; use super::User; #[derive(Debug, Hash, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Bio(pub String); impl GiteratedObjectValue for Bio { type Object = User; fn value_name() -> &'static str { "bio" } } #[derive(Debug, Hash, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DisplayName(pub String); impl Display for DisplayName { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.write_str(&self.0) } } impl GiteratedObjectValue for DisplayName { type Object = User; fn value_name() -> &'static str { "display_name" } }