pub enum Error {
ConversionExponent(ConversionExponentError),
UnconvertableDimensions(UnconvertableDimensionsError),
UnconvertableQuantity(UnconvertableQuantityError),
UnconvertableQuantities(UnconvertableQuantitiesError),
DifferentDimension(DifferentDimensionError),
}Expand description
An error enum that encompasses every error in this library
Variants§
ConversionExponent(ConversionExponentError)
A detailed breakdown of the error occurred when getting the conversion exponent from one Dimensions to another one.
UnconvertableDimensions(UnconvertableDimensionsError)
UnconvertableQuantity(UnconvertableQuantityError)
UnconvertableQuantities(UnconvertableQuantitiesError)
DifferentDimension(DifferentDimensionError)
Error when both Dimensions are incompatible.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0§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§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ConversionExponentError> for Error
impl From<ConversionExponentError> for Error
Source§fn from(value: ConversionExponentError) -> Self
fn from(value: ConversionExponentError) -> Self
Converts to this type from the input type.
Source§impl From<DifferentDimensionError> for Error
impl From<DifferentDimensionError> for Error
Source§fn from(value: DifferentDimensionError) -> Self
fn from(value: DifferentDimensionError) -> Self
Converts to this type from the input type.
Source§impl From<UnconvertableDimensionsError> for Error
impl From<UnconvertableDimensionsError> for Error
Source§fn from(value: UnconvertableDimensionsError) -> Self
fn from(value: UnconvertableDimensionsError) -> Self
Converts to this type from the input type.
Source§impl From<UnconvertableQuantitiesError> for Error
impl From<UnconvertableQuantitiesError> for Error
Source§fn from(value: UnconvertableQuantitiesError) -> Self
fn from(value: UnconvertableQuantitiesError) -> Self
Converts to this type from the input type.
Source§impl From<UnconvertableQuantityError> for Error
impl From<UnconvertableQuantityError> for Error
Source§fn from(value: UnconvertableQuantityError) -> Self
fn from(value: UnconvertableQuantityError) -> Self
Converts to this type from the input type.
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 UnwindSafe for Error
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)