19 lines
386 B
Rust
19 lines
386 B
Rust
use crate::types;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
|
#[derive(Debug, Deserialize, Serialize)]
|
|
pub struct Body {
|
|
pub name: String,
|
|
pub mass: types::Mass,
|
|
pub position: types::Position,
|
|
pub velocity: types::Velocity,
|
|
|
|
#[serde(default)]
|
|
pub acceleration: types::Acceleration,
|
|
}
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
pub struct ConfigFile {
|
|
pub bodies: Vec<Body>,
|
|
} |