pub struct CompendiumEntry {
pub name: String,
pub acronym: Vec<String>,
pub mat_num: u32,
pub density: f64,
pub atom_density: f64,
pub source: String,
pub comment: Vec<String>,
pub elements: Vec<CompendiumElement>,
}Expand description
One compendium material entry.
Fields§
§name: String§acronym: Vec<String>§mat_num: u32§density: f64Nominal density [g/cm³].
atom_density: f64§source: String§comment: Vec<String>§elements: Vec<CompendiumElement>Implementations§
Source§impl CompendiumEntry
impl CompendiumEntry
Sourcepub fn weight_fractions(&self) -> BTreeMap<u32, f64>
pub fn weight_fractions(&self) -> BTreeMap<u32, f64>
All (isotope ZAID → material-level weight fraction) pairs.
Sourcepub fn to_material(&self) -> Result<Material, Error>
pub fn to_material(&self) -> Result<Material, Error>
Convert to a Material whose composition holds relative masses
equal to the isotopic weight fractions (normalized to 1 g total).
Density and provenance are attached as metadata; set the real mass or density separately when building transport inputs.
Trait Implementations§
Source§impl Clone for CompendiumEntry
impl Clone for CompendiumEntry
Source§fn clone(&self) -> CompendiumEntry
fn clone(&self) -> CompendiumEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompendiumEntry
impl Debug for CompendiumEntry
Source§impl<'de> Deserialize<'de> for CompendiumEntry
impl<'de> Deserialize<'de> for CompendiumEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompendiumEntry
impl RefUnwindSafe for CompendiumEntry
impl Send for CompendiumEntry
impl Sync for CompendiumEntry
impl Unpin for CompendiumEntry
impl UnsafeUnpin for CompendiumEntry
impl UnwindSafe for CompendiumEntry
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