feature/share-libs
rs 27 lines 663 Bytes
Raw
1 use serde::{Deserialize, Serialize};
2 use super::player::TauriResponse;
3
4 #[derive(Serialize, Deserialize)]
5 pub struct SetEnvironmentResponse {
6 pub status: TauriResponse,
7 pub message: String,
8 }
9
10 #[derive(Serialize, Deserialize)]
11 #[derive(Debug)]
12 pub enum Environment {
13 #[serde(rename = "development")]
14 Development,
15 #[serde(rename = "production")]
16 Production,
17 }
18
19 impl std::fmt::Display for Environment {
20 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
21 let env = match self {
22 Environment::Development => "development",
23 Environment::Production => "production",
24 };
25 write!(f, "{}", env)
26 }
27 }