mirror of
https://github.com/tribufu/tribufu-rust
synced 2026-05-06 06:47:28 +00:00
38 lines
822 B
Rust
38 lines
822 B
Rust
/*
|
|
* Tribufu API
|
|
*
|
|
* REST API to access Tribufu services.
|
|
*
|
|
* The version of the OpenAPI document: 1.1.0
|
|
* Contact: contact@tribufu.com
|
|
* Generated by: https://openapi-generator.tech
|
|
*/
|
|
|
|
use crate::models;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
///
|
|
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
|
pub enum LeaderboardOrder {
|
|
#[serde(rename = "level")]
|
|
Level,
|
|
#[serde(rename = "points")]
|
|
Points,
|
|
|
|
}
|
|
|
|
impl std::fmt::Display for LeaderboardOrder {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
|
match self {
|
|
Self::Level => write!(f, "level"),
|
|
Self::Points => write!(f, "points"),
|
|
}
|
|
}
|
|
}
|
|
|
|
impl Default for LeaderboardOrder {
|
|
fn default() -> LeaderboardOrder {
|
|
Self::Level
|
|
}
|
|
}
|
|
|