JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Fixed imports!

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨ef0e853

⁨giterated-models/src/user/values.rs⁩ - ⁨561⁩ bytes
Raw
1 use serde::{Deserialize, Serialize};
2
3 use crate::value::GiteratedObjectValue;
4
5 use super::User;
6
7 #[derive(Debug, Hash, Clone, PartialEq, Eq, Serialize, Deserialize)]
8 pub struct Bio(pub String);
9
10 impl GiteratedObjectValue for Bio {
11 type Object = User;
12
13 fn value_name() -> &'static str {
14 "bio"
15 }
16 }
17
18 #[derive(Debug, Hash, Clone, PartialEq, Eq, Serialize, Deserialize)]
19 pub struct DisplayName(pub String);
20
21 impl GiteratedObjectValue for DisplayName {
22 type Object = User;
23
24 fn value_name() -> &'static str {
25 "display_name"
26 }
27 }
28