Skip to main content

DoseProvider

Trait DoseProvider 

Source
pub trait DoseProvider {
    // Required method
    fn dose_factor(
        &self,
        nucid: u32,
        pathway: DosePathway,
        source: DoseSource,
    ) -> Option<f64>;
}
Expand description

Source of per-nuclide dose factors (raw table values).

Like MassProvider, injected as a trait so analytics never hard-depend on dose-table availability. Kept separate from DecayProvider/ DecayEnergyProvider so callers can mix sources; the blanket impl for nucleide_nuclei::data::DoseData gives a single provider with no material↔nuclei circularity (material depends on nuclei, never the reverse).

Required Methods§

Source

fn dose_factor( &self, nucid: u32, pathway: DosePathway, source: DoseSource, ) -> Option<f64>

Raw dose factor for the nuclide identified by raw nucid, or None if the nuclide has no row for this pathway/source.

Implementations backed by crate::DoseFactors return the stored -1 sentinel for GENII/DOE air (PyNE missing-air convention); Material::dose_per_g treats negative factors as missing and fails with AnalyticsError::MissingDose.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl DoseProvider for DoseData

Source§

fn dose_factor( &self, nucid: u32, pathway: DosePathway, source: DoseSource, ) -> Option<f64>

Implementors§