#[non_exhaustive]pub enum Error {
BadZ(u32),
BadA {
z: u32,
a: u32,
},
MassNumberTooLarge(u32),
BadState(u32),
MissingMassNumber(String),
BadNumber(String),
UnknownElement(String),
}Expand description
Errors from nuclide parsing/validation.
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.
BadZ(u32)
Atomic number outside 1..=118.
BadA
Mass number smaller than the atomic number.
MassNumberTooLarge(u32)
Mass number above the 3-digit AAA limit (> 999).
BadState(u32)
Metastable state index above the supported range (> 9).
MissingMassNumber(String)
Name contained no digits (no mass number).
BadNumber(String)
Mass number or state component failed to parse as an integer.
UnknownElement(String)
Element symbol not recognized.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
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<Error> for DialectError
impl From<Error> for DialectError
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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