pub enum StoppingError {
Show 13 variants
InvalidEnergy(f64),
UnknownElement(u8),
NotApplicable {
model: &'static str,
energy_ev: f64,
},
InvalidParameter {
name: &'static str,
value: f64,
},
MissingProvenance,
InvalidTable(String),
InvalidDataset {
line: usize,
reason: String,
},
InvalidFit(String),
OutOfTableRange {
energy_ev: f64,
min_ev: f64,
max_ev: f64,
},
TableMismatch {
table_ion: u8,
table_target: u8,
ion: u8,
target: u8,
},
InvalidMass(f64),
TableMassMismatch {
table_mass_amu: f64,
mass_amu: f64,
},
Material(MaterialError),
}Expand description
Errors from stopping models, tables and Bragg sums.
Variants§
InvalidEnergy(f64)
Energy was not finite and positive.
UnknownElement(u8)
Atomic number outside the element table (1..=92).
NotApplicable
The model’s formula is not meaningful at this energy (for example the Bethe logarithm bracket is not positive far below its validity range).
InvalidParameter
A model parameter (for example a mean excitation energy) was not finite, or not positive where it must be.
MissingProvenance
A user table has no (or an empty) provenance field.
InvalidTable(String)
A user table is malformed.
InvalidDataset
A line of a stopping dataset (dataset) is malformed or fails
validation.
Fields
InvalidFit(String)
A correction fit (correction) could not be made, with the reason.
OutOfTableRange
A user table was queried outside its energy range.
Fields
TableMismatch
A user table was queried for a different ion or target than it holds.
Fields
InvalidMass(f64)
Projectile mass was not finite and positive.
TableMassMismatch
A user table was queried for a projectile mass different from the one it was declared for (a different isotope).
Fields
Material(MaterialError)
A material error while summing a compound.
Trait Implementations§
Source§impl Clone for StoppingError
impl Clone for StoppingError
Source§fn clone(&self) -> StoppingError
fn clone(&self) -> StoppingError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StoppingError
impl Debug for StoppingError
Source§impl Display for StoppingError
impl Display for StoppingError
Source§impl Error for StoppingError
impl Error for StoppingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<MaterialError> for StoppingError
impl From<MaterialError> for StoppingError
Source§fn from(source: MaterialError) -> Self
fn from(source: MaterialError) -> Self
Source§impl From<StoppingError> for HistoryError
impl From<StoppingError> for HistoryError
Source§fn from(source: StoppingError) -> Self
fn from(source: StoppingError) -> Self
Source§impl PartialEq for StoppingError
impl PartialEq for StoppingError
impl StructuralPartialEq for StoppingError
Auto Trait Implementations§
impl Freeze for StoppingError
impl RefUnwindSafe for StoppingError
impl Send for StoppingError
impl Sync for StoppingError
impl Unpin for StoppingError
impl UnsafeUnpin for StoppingError
impl UnwindSafe for StoppingError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more