use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Point {
#[serde(rename = "coordinates")]
pub coordinates: Vec<f64>,
#[serde(rename = "type")]
pub r#type: Type,
}
impl Point {
pub fn new(coordinates: Vec<f64>, r#type: Type) -> Point {
Point {
coordinates,
r#type,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "Point")]
Point,
}
impl Default for Type {
fn default() -> Type {
Self::Point
}
}