Struct Dose
pub struct Dose {
pub rate: f64,
pub kind: DoseKind,
}
Expand description
Total sample dose rate and type
Note that this is not directly translated from the original JSON structure. Instead, the deserialiser was written to make this more ergonomic.
For example:
"dose_rate": {
"type": "Point source",
"distance": 1.0,
"mass": 1.0,
"dose": 1.0
}
This is turned into a Dose of type DoseKind::Contact or DoseKind::Point, which holds a distance.
Mass is ignored as redundant - Either it matches sample mass, or is irrelevant for a contact dose.
Fields§
§rate: f64
Dose rate (Sv/hr)
kind: DoseKind
Type of dose
Trait Implementations§
§impl<'de> Deserialize<'de> for Dose
impl<'de> Deserialize<'de> for Dose
§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
impl Copy for Dose
Auto Trait Implementations§
impl Freeze for Dose
impl RefUnwindSafe for Dose
impl Send for Dose
impl Sync for Dose
impl Unpin for Dose
impl UnwindSafe for Dose
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