Skip to main content

MassProvider

Trait MassProvider 

Source
pub trait MassProvider {
    // Required method
    fn mass(&self, nucid: u32) -> Option<f64>;
}
Expand description

Source of per-nuclide atomic masses in g/mol.

Atomic-mass-dependent operations (Material::from_atom_frac and Material::atom_fractions) are generic over this trait so the material crate never depends on the nuclear-data tables directly. Integrating the real tables later is a single impl MassProvider for nucleide_nuclei::data::....

Required Methods§

Source

fn mass(&self, nucid: u32) -> Option<f64>

Atomic mass of the nuclide identified by raw nucid ((Z*1000 + A)*10_000 + state), or None if unknown.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§