pub enum ElectronDataError {
MissingProvenance,
MissingIdentity(&'static str),
MalformedText {
field: &'static str,
reason: String,
},
Invalid {
what: &'static str,
reason: String,
},
OutOfRange {
quantity: &'static str,
value: f64,
min: f64,
max: f64,
},
IndexOutOfRange {
index: usize,
len: usize,
},
UnsupportedVersion {
found: Option<u32>,
supported: u32,
},
ZeroRate {
energy_ev: f64,
},
Parse(String),
Io(String),
}Expand description
Errors from building, reading or querying electron data.
Variants§
MissingProvenance
No provenance, or one that is blank after trimming.
MissingIdentity(&'static str)
A required identity string (material, model) is missing or blank.
MalformedText
A text field is present but unusable.
Invalid
A numeric field or the shape of the data violates an invariant.
OutOfRange
A query outside the tabulated range. Nothing is extrapolated.
Fields
IndexOutOfRange
A grid index past the end of the table.
UnsupportedVersion
A cache file declares a format version this build does not read.
Fields
§
supported: u32Version this build supports (CACHE_FORMAT_VERSION).
ZeroRate
Sampling was requested at an energy whose inverse mean free path is zero: there is no interaction there and no distribution to sample.
Parse(String)
A file could not be parsed.
Io(String)
A file could not be read or written.
Trait Implementations§
Source§impl Clone for ElectronDataError
impl Clone for ElectronDataError
Source§fn clone(&self) -> ElectronDataError
fn clone(&self) -> ElectronDataError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElectronDataError
impl Debug for ElectronDataError
Source§impl Display for ElectronDataError
impl Display for ElectronDataError
Source§impl Error for ElectronDataError
impl Error for ElectronDataError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<ElectronDataError> for ElasticTableError
impl From<ElectronDataError> for ElasticTableError
Source§fn from(source: ElectronDataError) -> Self
fn from(source: ElectronDataError) -> Self
Converts to this type from the input type.
Source§impl From<ElectronDataError> for InelasticTableError
impl From<ElectronDataError> for InelasticTableError
Source§fn from(source: ElectronDataError) -> Self
fn from(source: ElectronDataError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ElectronDataError
impl PartialEq for ElectronDataError
impl StructuralPartialEq for ElectronDataError
Auto Trait Implementations§
impl Freeze for ElectronDataError
impl RefUnwindSafe for ElectronDataError
impl Send for ElectronDataError
impl Sync for ElectronDataError
impl Unpin for ElectronDataError
impl UnsafeUnpin for ElectronDataError
impl UnwindSafe for ElectronDataError
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
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> ⓘ
Converts
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> ⓘ
Converts
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