space_traders/models/
ship_nav_status.rs

1//! Generated by: <https://openapi-generator.tech>
2//!
3//! Version of specification: `2.0.0`
4
5use serde::{Deserialize, Serialize};
6
7/// The current status of the ship
8#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
9pub enum ShipNavStatus {
10    #[serde(rename = "IN_TRANSIT")]
11    InTransit,
12    #[serde(rename = "IN_ORBIT")]
13    InOrbit,
14    #[serde(rename = "DOCKED")]
15    Docked,
16}
17
18impl ToString for ShipNavStatus {
19    fn to_string(&self) -> String {
20        match self {
21            Self::InTransit => String::from("IN_TRANSIT"),
22            Self::InOrbit => String::from("IN_ORBIT"),
23            Self::Docked => String::from("DOCKED"),
24        }
25    }
26}