Repository navigation
Expand file tree
/
Copy pathenums.rs
More file actions
89 lines (82 loc) 路 1.71 KB
/
Copy pathenums.rs
File metadata and controls
89 lines (82 loc) 路 1.71 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//! Enums used throughout the TCGdex SDK
use strum_macros::{Display, EnumString};
/// Language codes supported by the TCGdex API
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Display, EnumString)]
#[strum(serialize_all = "lowercase")]
#[allow(non_camel_case_types)]
pub enum Language {
/// English
EN,
/// French
FR,
/// Spanish
ES,
/// Latin Spanish
#[strum(serialize = "es-mx")]
ES_MX,
/// Italian
IT,
/// Brazilian Portuguese
#[strum(serialize = "pt-br")]
PT_BR,
/// Portugal Portuguese
#[strum(serialize = "pt-pt")]
PT_PT,
/// German
DE,
/// Dutch
NL,
/// Polish
PL,
/// Russian
RU,
/// Japanese
JA,
/// Korean
KO,
/// Traditional Chinese
#[strum(serialize = "zh-tw")]
ZH_TW,
/// Indonesian
ID,
/// Thai
TH,
/// Simplified Chinese
#[strum(serialize = "zh-cn")]
ZH_CN,
}
impl Default for Language {
fn default() -> Self {
Self::EN
}
}
/// The different image formats available
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Display, EnumString)]
#[strum(serialize_all = "lowercase")]
pub enum Extension {
/// PNG image with transparent background
PNG,
/// JPG image with white background
JPG,
/// WEBP image with transparent background
WEBP,
}
impl Default for Extension {
fn default() -> Self {
Self::PNG
}
}
/// Image quality options
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Display, EnumString)]
#[strum(serialize_all = "lowercase")]
pub enum Quality {
/// High quality image
HIGH,
/// Low quality image
LOW,
}
impl Default for Quality {
fn default() -> Self {
Self::HIGH
}
}