pinterest_api/parameter/
pin_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
use serde::{Deserialize, Serialize};
use std::fmt;

#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum PinType {
    Private,
}

impl fmt::Display for PinType {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        let display_str = match self {
            Self::Private => "PRIVATE",
        };
        write!(f, "{}", display_str)
    }
}

impl Default for PinType {
    fn default() -> Self {
        Self::Private
    }
}