pub enum Baryon {
Proton(f64),
Neutron(f64),
}
Expand description
Currently only supports proton and neutron
Variants§
Implementations§
source§impl Baryon
impl Baryon
sourcepub const fn new(x: Quark, y: Quark, z: Quark, ke: f64) -> Baryon
pub const fn new(x: Quark, y: Quark, z: Quark, ke: f64) -> Baryon
Compose proton or neutron using quarks
pub const fn charge(&self) -> f64
pub const fn rest_mass(&self) -> f64
pub fn rest_mass_kg(&self) -> f64
pub const fn kinetic(&self) -> f64
pub fn momentum(&self) -> f64
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Baryon
impl Send for Baryon
impl Sync for Baryon
impl Unpin for Baryon
impl UnwindSafe for Baryon
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