pub struct Body {
pub name: String,
pub mass: f64,
pub radius: f64,
pub orbit: Option<Orbit>,
}Expand description
A struct representing a celestial body.
Fields§
§name: StringThe name of the celestial body.
mass: f64The mass of the celestial body, in kilograms.
radius: f64The radius of the celestial body, in meters.
orbit: Option<Orbit>The orbit of the celestial body, if it is orbiting one.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Body
Auto Trait Implementations§
impl Freeze for Body
impl RefUnwindSafe for Body
impl Send for Body
impl Sync for Body
impl Unpin for Body
impl UnwindSafe for Body
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more