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

21 lines
442 B
Rust
Raw Normal View History

2024-05-11 21:04:12 +00:00
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,
}
}
}