pub enum QuantumNumberConversionError {
Ambiguous {
kind: &'static str,
},
Unknown {
kind: &'static str,
},
Custom {
kind: &'static str,
value: String,
},
OutOfRange {
kind: &'static str,
numerator: i32,
denominator: i32,
target: &'static str,
},
}Expand description
Error returned when a quantum number cannot be converted to a numeric type.
Variants§
Ambiguous
The source value represents more than one possible numeric value.
Unknown
The source value is explicitly unknown.
Custom
The source value is a custom string that cannot be parsed as a number.
Fields
OutOfRange
The rational value cannot be represented by the requested target type.
Trait Implementations§
Source§impl Clone for QuantumNumberConversionError
impl Clone for QuantumNumberConversionError
Source§fn clone(&self) -> QuantumNumberConversionError
fn clone(&self) -> QuantumNumberConversionError
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 QuantumNumberConversionError
impl Debug for QuantumNumberConversionError
impl Eq for QuantumNumberConversionError
Source§impl Error for QuantumNumberConversionError
impl Error for QuantumNumberConversionError
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<QuantumNumberConversionError> for PdgError
impl From<QuantumNumberConversionError> for PdgError
Source§fn from(source: QuantumNumberConversionError) -> Self
fn from(source: QuantumNumberConversionError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for QuantumNumberConversionError
impl PartialEq for QuantumNumberConversionError
Source§fn eq(&self, other: &QuantumNumberConversionError) -> bool
fn eq(&self, other: &QuantumNumberConversionError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for QuantumNumberConversionError
Auto Trait Implementations§
impl Freeze for QuantumNumberConversionError
impl RefUnwindSafe for QuantumNumberConversionError
impl Send for QuantumNumberConversionError
impl Sync for QuantumNumberConversionError
impl Unpin for QuantumNumberConversionError
impl UnsafeUnpin for QuantumNumberConversionError
impl UnwindSafe for QuantumNumberConversionError
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