pinterest_api/parameter/
app_type.rs1use serde::{Deserialize, Serialize};
2use std::fmt;
3
4#[derive(Serialize, Deserialize, Debug, Clone)]
5#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
6pub enum AppType {
7 All,
8 Mobile,
9 Tablet,
10 Web,
11}
12
13impl fmt::Display for AppType {
14 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
15 match self {
16 Self::All => write!(f, "ALL"),
17 Self::Mobile => write!(f, "MOBILE"),
18 Self::Tablet => write!(f, "TABLET"),
19 Self::Web => write!(f, "WEB"),
20 }
21 }
22}
23
24impl Default for AppType {
25 fn default() -> Self {
26 Self::All
27 }
28}