From bff89fedb8690d14ed448e27b405d6d82eb1ce6f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 31 Jan 2021 23:09:24 +0000 Subject: [PATCH] provide Area type We are going to want this for occultations. This doesn't really do anything yet. Signed-off-by: Ian Jackson --- src/spec.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/spec.rs b/src/spec.rs index a0939407..d71dc122 100644 --- a/src/spec.rs +++ b/src/spec.rs @@ -33,6 +33,11 @@ pub type Coord = i32; pub struct PosC(pub [T; 2]); pub type Pos = PosC; +#[derive(Clone,Copy,Debug,Serialize,Deserialize,Hash)] +#[serde(transparent)] +pub struct AreaC(pub [PosC; 2]); +pub type Area = AreaC; + #[derive(Clone,Eq,PartialEq,Ord,PartialOrd,Hash,Serialize,Deserialize)] #[serde(transparent)] pub struct RawToken(pub String); -- 2.30.2