refactor: serialise all enums to snake_case
This commit is contained in:
parent
b829df1da1
commit
7d0789cc2f
|
@ -11,6 +11,7 @@ use std::str::FromStr;
|
|||
/// The clans of the playable races in the game.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "with_serde", serde(rename_all = "snake_case"))]
|
||||
pub enum Clan {
|
||||
// Au Ra
|
||||
Raen,
|
||||
|
|
|
@ -7,6 +7,7 @@ use std::str::FromStr;
|
|||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "with_serde", serde(rename_all = "snake_case"))]
|
||||
pub enum DataCenter {
|
||||
Aether,
|
||||
Chaos,
|
||||
|
|
|
@ -8,6 +8,7 @@ use std::str::FromStr;
|
|||
/// The guardian deities in the game.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "with_serde", serde(rename_all = "snake_case"))]
|
||||
pub enum Guardian {
|
||||
Althyk,
|
||||
Azeyma,
|
||||
|
|
|
@ -13,6 +13,7 @@ use std::str::FromStr;
|
|||
/// [`NonCombatJob`]: ::jobs::NonCombatJob
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "with_serde", serde(rename_all = "snake_case"))]
|
||||
pub enum Classification {
|
||||
War,
|
||||
Magic,
|
||||
|
|
|
@ -12,6 +12,7 @@ use std::str::FromStr;
|
|||
/// The Disciple of War and Disciple of Magic jobs available in the game.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "with_serde", serde(rename_all = "snake_case"))]
|
||||
pub enum Job {
|
||||
// DPS
|
||||
Bard,
|
||||
|
|
|
@ -10,6 +10,7 @@ use std::str::FromStr;
|
|||
/// The Disciple of the Land and Disciple of the Hand jobs available in the game.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "with_serde", serde(rename_all = "snake_case"))]
|
||||
pub enum NonCombatJob {
|
||||
// Gatherers
|
||||
Botanist,
|
||||
|
|
|
@ -11,6 +11,7 @@ use std::str::FromStr;
|
|||
/// The playable races in the game.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "with_serde", serde(rename_all = "snake_case"))]
|
||||
pub enum Race {
|
||||
AuRa,
|
||||
Elezen,
|
||||
|
|
|
@ -12,6 +12,7 @@ use std::str::FromStr;
|
|||
/// [`Job`]: ::jobs::Job
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "with_serde", serde(rename_all = "snake_case"))]
|
||||
pub enum Role {
|
||||
Dps,
|
||||
Healer,
|
||||
|
|
|
@ -12,6 +12,7 @@ use std::str::FromStr;
|
|||
/// Each [`DataCenter`] has multiple worlds attached to it.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "with_serde", serde(rename_all = "snake_case"))]
|
||||
pub enum World {
|
||||
// Aether
|
||||
Adamantoise,
|
||||
|
|
Loading…
Reference in New Issue