space_traders_api/models/
faction_symbol.rs

1/*
2 * SpaceTraders API
3 *
4 * SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe.  The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server.  ```json http {   \"method\": \"GET\",   \"url\": \"https://api.spacetraders.io/v2\", } ```  Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community.  We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players.   
5 *
6 * The version of the OpenAPI document: 2.3.0
7 * Contact: joel@spacetraders.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// FactionSymbol : The symbol of the faction.
15/// The symbol of the faction.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum FactionSymbol {
18    #[serde(rename = "COSMIC")]
19    Cosmic,
20    #[serde(rename = "VOID")]
21    Void,
22    #[serde(rename = "GALACTIC")]
23    Galactic,
24    #[serde(rename = "QUANTUM")]
25    Quantum,
26    #[serde(rename = "DOMINION")]
27    Dominion,
28    #[serde(rename = "ASTRO")]
29    Astro,
30    #[serde(rename = "CORSAIRS")]
31    Corsairs,
32    #[serde(rename = "OBSIDIAN")]
33    Obsidian,
34    #[serde(rename = "AEGIS")]
35    Aegis,
36    #[serde(rename = "UNITED")]
37    United,
38    #[serde(rename = "SOLITARY")]
39    Solitary,
40    #[serde(rename = "COBALT")]
41    Cobalt,
42    #[serde(rename = "OMEGA")]
43    Omega,
44    #[serde(rename = "ECHO")]
45    Echo,
46    #[serde(rename = "LORDS")]
47    Lords,
48    #[serde(rename = "CULT")]
49    Cult,
50    #[serde(rename = "ANCIENTS")]
51    Ancients,
52    #[serde(rename = "SHADOW")]
53    Shadow,
54    #[serde(rename = "ETHEREAL")]
55    Ethereal,
56
57}
58
59impl std::fmt::Display for FactionSymbol {
60    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
61        match self {
62            Self::Cosmic => write!(f, "COSMIC"),
63            Self::Void => write!(f, "VOID"),
64            Self::Galactic => write!(f, "GALACTIC"),
65            Self::Quantum => write!(f, "QUANTUM"),
66            Self::Dominion => write!(f, "DOMINION"),
67            Self::Astro => write!(f, "ASTRO"),
68            Self::Corsairs => write!(f, "CORSAIRS"),
69            Self::Obsidian => write!(f, "OBSIDIAN"),
70            Self::Aegis => write!(f, "AEGIS"),
71            Self::United => write!(f, "UNITED"),
72            Self::Solitary => write!(f, "SOLITARY"),
73            Self::Cobalt => write!(f, "COBALT"),
74            Self::Omega => write!(f, "OMEGA"),
75            Self::Echo => write!(f, "ECHO"),
76            Self::Lords => write!(f, "LORDS"),
77            Self::Cult => write!(f, "CULT"),
78            Self::Ancients => write!(f, "ANCIENTS"),
79            Self::Shadow => write!(f, "SHADOW"),
80            Self::Ethereal => write!(f, "ETHEREAL"),
81        }
82    }
83}
84
85impl Default for FactionSymbol {
86    fn default() -> FactionSymbol {
87        Self::Cosmic
88    }
89}
90