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

pub trait Mass : Any {
    fn new(name : &str, location : (isize, isize, isize)) -> Self where Self: Sized;
    fn name(&self) -> &String;
    fn location(&self) -> (isize, isize, isize);
    fn set_location(&mut self, location : (isize, isize, isize));
    fn serialize(&self) -> String;
}

downcast!(Mass);