alert-me/app/src/data/circle.rs

21 lines
442 B
Rust

use serde::{Deserialize, Serialize};
use crate::json;
use super::coordinate::Coordinate;
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Circle {
pub center_position: Coordinate,
radius: String,
}
impl From<json::circle::Circle> for Circle {
fn from(value: json::circle::Circle) -> Self {
Self {
center_position: value.center_position.into(),
radius: value.radius,
}
}
}