Function fetch_nuclide
pub fn fetch_nuclide<N>(nuclide: N, rad_type: RadType) -> Option<Vec<Record>>
Expand description
Fetch single nuclide direct from IAEA
This automatically deserialises the raw CSV data into Records for the
requested nuclide and decay radiation type. Will return None
if there is
any issue with the request or if it contains no Records for the decay
radiation type.
Note this will accept a Nuclide or any &str
, String
, or &String
that
will parse into a Nuclide.
Use fetch_csv() to inspect the raw CSV data returned form the IAEA.
For example:
// Try to get the records for Sodium-22
let records: Vec<Record> = fetch_nuclide("na22", RadType::Gamma).unwrap();
// Print the gamma energies
for r in records {
println!("{} keV", r.energy.display())
}
1274.537 keV
511 keV
0.848 keV
0.848 keV
For details of the data structure and associated convenience methods see the Record type.