summaryrefslogtreecommitdiff
path: root/src/mass.rs
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2018-02-26 08:51:08 -0600
committertom barrett <spalf0@gmail.com>2018-02-26 08:51:08 -0600
commitc14dcf1998f5ba1ffea813da4f793fc3bde8c2b7 (patch)
treef650e9bdf008a785b4627db04446c717f530e7c5 /src/mass.rs
parent6634f73a6768f61f928d51941be5e970e6011f07 (diff)
-figured out way to deserialize using serde_erased
Diffstat (limited to 'src/mass.rs')
-rw-r--r--src/mass.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mass.rs b/src/mass.rs
index 0a49dc6..71723cd 100644
--- a/src/mass.rs
+++ b/src/mass.rs
@@ -6,7 +6,12 @@ pub trait Mass : Any {
fn location(&self) -> (f64, f64, f64);
fn set_location(&mut self, location : (f64, f64, f64));
fn serialize(&self) -> String;
- fn deserialize(&mut self, data : &str);
+}
+
+#[derive(Serialize, Deserialize, Debug)]
+pub enum Type {
+ Ship,
+ Astroid,
}
downcast!(Mass);