pinterest_api/parameter/
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 Collection,
13 Idea,
14}
15
16impl fmt::Display for CreativeType {
17 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
18 match self {
19 Self::Regular => write!(f, "REGULAR"),
20 Self::Video => write!(f, "VIDEO"),
21 Self::Shopping => write!(f, "SHOPPING"),
22 Self::Carousel => write!(f, "CAROUSEL"),
23 Self::MaxVideo => write!(f, "MAX_VIDEO"),
24 Self::Collection => write!(f, "COLLECTION"),
25 Self::Idea => write!(f, "IDEA"),
26 }
27 }
28}
29
30impl Default for CreativeType {
31 fn default() -> Self {
32 Self::Regular
33 }
34}