blob: 8c50348bd5d84c5591cfa7d2b87ac2a2d8dd5b31 (
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 : (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;
fn deserialize(&mut self, data : &str);
}
downcast!(Mass);
|