summaryrefslogtreecommitdiff
path: root/src/astroid.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/astroid.rs
parent6634f73a6768f61f928d51941be5e970e6011f07 (diff)
-figured out way to deserialize using serde_erased
Diffstat (limited to 'src/astroid.rs')
-rw-r--r--src/astroid.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/astroid.rs b/src/astroid.rs
index 0eed4ff..6aa1807 100644
--- a/src/astroid.rs
+++ b/src/astroid.rs
@@ -1,9 +1,10 @@
-use mass::Mass;
+use mass::{Mass, Type};
extern crate serde_json;
#[derive(Serialize, Deserialize, Debug)]
pub struct Astroid {
name : String,
+ t : Type,
location : (f64, f64, f64),
}
@@ -11,6 +12,7 @@ impl Mass for Astroid {
fn new(name : &str, location : (f64, f64, f64)) -> Astroid {
Astroid {
name : String::from(name),
+ t : Type::Astroid,
location : location,
}
}
@@ -30,7 +32,4 @@ impl Mass for Astroid {
fn serialize(&self) ->String {
serde_json::to_string(self).unwrap()
}
-
- fn deserialize(&mut self, data : &str) {
- }
}