#![allow(clippy::exhaustive_structs)]
use ruma_common::OwnedMxcUri;
use serde::{Serialize, de::DeserializeOwned};
pub trait StaticProfileField {
type Value: Sized + Serialize + DeserializeOwned;
const NAME: &str;
}
#[derive(Debug, Clone, Copy)]
pub struct AvatarUrl;
impl StaticProfileField for AvatarUrl {
type Value = OwnedMxcUri;
const NAME: &str = "avatar_url";
}
#[derive(Debug, Clone, Copy)]
pub struct DisplayName;
impl StaticProfileField for DisplayName {
type Value = String;
const NAME: &str = "displayname";
}
#[derive(Debug, Clone, Copy)]
pub struct TimeZone;
impl StaticProfileField for TimeZone {
type Value = String;
const NAME: &str = "m.tz";
}