#[non_exhaustive]pub enum DialectError {
NotANuclide(u32),
MissingMassNumber(String),
UnknownElement(String),
BadIsomerLetter(char),
NaturalElement(String),
UnknownFlukaName(String),
ZzSymbolMismatch {
zz: u32,
symbol: String,
},
BadComponents(Error),
}Expand description
Errors raised by the dialect converters in this module.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotANuclide(u32)
Numeric input admits no interpretation in the source dialect.
MissingMassNumber(String)
Input is empty or carries no mass number where one is required.
UnknownElement(String)
Element symbol portion is not recognized.
BadIsomerLetter(char)
Trailing metastable designator is not one of mnopqrstuvxyz.
NaturalElement(String)
Input denotes a natural element, unrepresentable as a NuclideId.
UnknownFlukaName(String)
Name is absent from the vendored FLUKA table.
ZzSymbolMismatch
Leading ZZ block disagrees with the element symbol.
BadComponents(Error)
Component values were rejected by canonical validation.
Trait Implementations§
Source§impl Clone for DialectError
impl Clone for DialectError
Source§fn clone(&self) -> DialectError
fn clone(&self) -> DialectError
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 DialectError
impl Debug for DialectError
Source§impl Display for DialectError
impl Display for DialectError
impl Eq for DialectError
Source§impl Error for DialectError
impl Error for DialectError
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<Error> for DialectError
impl From<Error> for DialectError
Source§impl PartialEq for DialectError
impl PartialEq for DialectError
impl StructuralPartialEq for DialectError
Auto Trait Implementations§
impl Freeze for DialectError
impl RefUnwindSafe for DialectError
impl Send for DialectError
impl Sync for DialectError
impl Unpin for DialectError
impl UnsafeUnpin for DialectError
impl UnwindSafe for DialectError
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