pub struct Set {
pub reactants: ArrayVec<Nuclide, 4>,
pub products: ArrayVec<Nuclide, 4>,
pub label: ArrayString<4>,
pub resonance: Resonance,
pub reverse: bool,
pub q_value: f64,
pub params: [f64; 7],
}Expand description
A type holding a single set of reaclib data.
A reaction may be made up of multiple sets.
use reaclib::{Format, Iter};
use std::io::Cursor;
let reader = Cursor::new(r"1
n p wc12w 7.82300e-01
-6.781610e+00 0.000000e+00 0.000000e+00 0.000000e+00
0.000000e+00 0.000000e+00 0.000000e+00 ");
let mut iter = Iter::new(reader, Format::Reaclib2);
let data = iter.next().unwrap().unwrap();
assert_eq!(data.q_value, 7.82300e-01);Fields§
§reactants: ArrayVec<Nuclide, 4>The nuclides going into a reaction.
products: ArrayVec<Nuclide, 4>The nuclides resulting from a reaction.
label: ArrayString<4>A label denoting the source of the reaction.
Here is a list of all labels.
resonance: ResonanceThe resonance flag for the reaction.
reverse: boolA flag denoting whether the reaction rate was derived from the reverse rate using detailed balance.
Rates with this flag set, must be corrected to include partition function modifications.
q_value: f64The Q-value of the reaction.
params: [f64; 7]The parameters of this reaction rate set.
See the reaclib format help
for how to interpret these parameters, and rate for an implementation of
that.
Implementations§
Trait Implementations§
Source§impl<'a> Arbitrary<'a> for Set
impl<'a> Arbitrary<'a> for Set
Source§fn arbitrary(u: &mut Unstructured<'_>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'_>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured this type
needs to construct itself. Read moreSource§impl<'de> Deserialize<'de> for Set
impl<'de> Deserialize<'de> for Set
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
impl StructuralPartialEq for Set
Auto Trait Implementations§
impl Freeze for Set
impl RefUnwindSafe for Set
impl Send for Set
impl Sync for Set
impl Unpin for Set
impl UnwindSafe for Set
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