summaryrefslogtreecommitdiff
path: root/src/mass.rs
blob: 0a49dc6a6df7c7ffb89adc4ab740715af027b1d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use downcast::Any;

pub trait Mass : Any {
    fn new(name : &str, location : (f64, f64, f64)) -> Self where Self: Sized;
    fn name(&self) -> &String;
    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);
}

downcast!(Mass);