zoe_app_primitives/
metadata.rs

1use forward_compatible_enum::ForwardCompatibleEnum;
2
3use crate::Image;
4
5#[derive(Debug, Clone, PartialEq, Eq, ForwardCompatibleEnum)]
6pub enum Metadata {
7    #[discriminant(0)]
8    Generic { key: String, value: String },
9
10    #[discriminant(10)]
11    Description(String),
12
13    #[discriminant(20)]
14    Avatar(Image),
15    #[discriminant(21)]
16    Background(Image),
17    #[discriminant(30)]
18    Website(String),
19    #[discriminant(40)]
20    Email(String),
21    #[discriminant(41)]
22    Phone(String),
23    #[discriminant(50)]
24    Address(String),
25    #[discriminant(60)]
26    Social { platform: String, handle: String },
27
28    /// Unknown metadata type for forward compatibility
29    Unknown { discriminant: u32, data: Vec<u8> },
30}