pub enum MolarMassValidationError {
NonFiniteMolarMass,
NonPositiveMolarMass,
InvalidElementSymbol(String),
NonFiniteAtomicMass {
symbol: String,
},
NonPositiveAtomicMass {
symbol: String,
},
ZeroElementCount {
symbol: String,
},
FormulaCountTooLarge {
symbol: String,
count: u64,
},
MissingAtomicMass {
symbol: String,
},
}Expand description
Errors returned while constructing or calculating molar mass values.
Variants§
NonFiniteMolarMass
A molar mass value was not finite.
NonPositiveMolarMass
A molar mass value was zero or negative.
InvalidElementSymbol(String)
An element symbol does not match the supported chemical-formula shape.
NonFiniteAtomicMass
An atomic mass value was not finite.
NonPositiveAtomicMass
An atomic mass value was zero or negative.
ZeroElementCount
An expanded formula count was zero.
FormulaCountTooLarge
An expanded formula count cannot fit the contribution count type.
MissingAtomicMass
No atomic mass entry exists for a required element symbol.
Trait Implementations§
Source§impl Clone for MolarMassValidationError
impl Clone for MolarMassValidationError
Source§fn clone(&self) -> MolarMassValidationError
fn clone(&self) -> MolarMassValidationError
Returns a duplicate of the value. Read more
1.0.0 · 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 MolarMassValidationError
impl Debug for MolarMassValidationError
Source§impl Display for MolarMassValidationError
impl Display for MolarMassValidationError
Source§impl Error for MolarMassValidationError
impl Error for MolarMassValidationError
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 PartialEq for MolarMassValidationError
impl PartialEq for MolarMassValidationError
impl Eq for MolarMassValidationError
impl StructuralPartialEq for MolarMassValidationError
Auto Trait Implementations§
impl Freeze for MolarMassValidationError
impl RefUnwindSafe for MolarMassValidationError
impl Send for MolarMassValidationError
impl Sync for MolarMassValidationError
impl Unpin for MolarMassValidationError
impl UnsafeUnpin for MolarMassValidationError
impl UnwindSafe for MolarMassValidationError
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