pinterest_api/response/
creative_type.rs1use serde::{Deserialize, Serialize};
2use std::fmt;
3
4#[derive(Serialize, Deserialize, Debug, Clone)]
5#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
6pub enum CreativeType {
7 Regular,
8 Video,
9 Shopping,
10 Carousel,
11 MaxVideo,
12 ShopThePin,
13 Collection,
14 Idea,
15 Showcase,
16 Quiz,
17}
18
19impl fmt::Display for CreativeType {
20 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
21 match self {
22 Self::Regular => write!(f, "REGULAR"),
23 Self::Video => write!(f, "VIDEO"),
24 Self::Shopping => write!(f, "SHOPPING"),
25 Self::Carousel => write!(f, "CAROUSEL"),
26 Self::MaxVideo => write!(f, "MAX_VIDEO"),
27 Self::ShopThePin => write!(f, "SHOP_THE_PIN"),
28 Self::Collection => write!(f, "COLLECTION"),
29 Self::Idea => write!(f, "IDEA"),
30 Self::Showcase => write!(f, "SHOWCASE"),
31 Self::Quiz => write!(f, "QUIZ"),
32 }
33 }
34}
35
36impl Default for CreativeType {
37 fn default() -> Self {
38 Self::Regular
39 }
40}