pinterest_api/parameter/
app_type.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use serde::{Deserialize, Serialize};
use std::fmt;

#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum AppType {
    All,
    Mobile,
    Tablet,
    Web,
}

impl fmt::Display for AppType {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match self {
            Self::All => write!(f, "ALL"),
            Self::Mobile => write!(f, "MOBILE"),
            Self::Tablet => write!(f, "TABLET"),
            Self::Web => write!(f, "WEB"),
        }
    }
}

impl Default for AppType {
    fn default() -> Self {
        Self::All
    }
}