osdm_sys/models/
place_type.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
18pub enum PlaceType {
19 #[serde(rename = "STOP")]
20 Stop,
21 #[serde(rename = "ADDRESS")]
22 Address,
23 #[serde(rename = "POI")]
24 Poi,
25 #[serde(rename = "GEO_COORDINATE")]
26 GeoCoordinate,
27 #[serde(rename = "TOPOGRAPHIC_PLACE")]
28 TopographicPlace,
29
30}
31
32impl std::fmt::Display for PlaceType {
33 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
34 match self {
35 Self::Stop => write!(f, "STOP"),
36 Self::Address => write!(f, "ADDRESS"),
37 Self::Poi => write!(f, "POI"),
38 Self::GeoCoordinate => write!(f, "GEO_COORDINATE"),
39 Self::TopographicPlace => write!(f, "TOPOGRAPHIC_PLACE"),
40 }
41 }
42}
43
44impl Default for PlaceType {
45 fn default() -> PlaceType {
46 Self::Stop
47 }
48}
49