pub enum ReciprocalInputErrors<RawScalar: RawScalarTrait> {
DivisionByZero {
backtrace: Backtrace,
},
InvalidArgument {
source: <RawScalar as RawScalarTrait>::ValidationErrors,
},
}Expand description
Errors that can occur during the input validation phase or due to special input values when attempting to compute the reciprocal of a number.
This enum is used as a source for the Input variant of ReciprocalErrors.
It is generic over RawScalar: RawScalarTrait. The InvalidArgument
variant contains a source of type <RawScalar as RawScalarTrait>::ValidationErrors.
Variants§
DivisionByZero
The input value is zero.
This error occurs when the input value for the reciprocal computation is zero, as division by zero is undefined.
InvalidArgument
The input value failed basic validation checks.
This error occurs if the input value itself is considered invalid
according to the validation policy (e.g., StrictFinitePolicy),
such as being NaN or Infinity, before the reciprocal calculation
is attempted.
Fields
source: <RawScalar as RawScalarTrait>::ValidationErrorsThe underlying validation error from the input type.
This provides more specific details about why the input value was considered invalid.
Trait Implementations§
Source§impl<RawScalar: Debug + RawScalarTrait> Debug for ReciprocalInputErrors<RawScalar>
impl<RawScalar: Debug + RawScalarTrait> Debug for ReciprocalInputErrors<RawScalar>
Source§impl<RawScalar: RawScalarTrait> Display for ReciprocalInputErrors<RawScalar>
impl<RawScalar: RawScalarTrait> Display for ReciprocalInputErrors<RawScalar>
Source§impl<RawScalar: RawScalarTrait> Error for ReciprocalInputErrors<RawScalar>
impl<RawScalar: RawScalarTrait> Error for ReciprocalInputErrors<RawScalar>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Source§fn provide<'_request>(&'_request self, request: &mut Request<'_request>)
fn provide<'_request>(&'_request self, request: &mut Request<'_request>)
error_generic_member_access)1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl<RawScalar> !Freeze for ReciprocalInputErrors<RawScalar>
impl<RawScalar> RefUnwindSafe for ReciprocalInputErrors<RawScalar>
impl<RawScalar> Send for ReciprocalInputErrors<RawScalar>
impl<RawScalar> Sync for ReciprocalInputErrors<RawScalar>
impl<RawScalar> Unpin for ReciprocalInputErrors<RawScalar>
impl<RawScalar> UnsafeUnpin for ReciprocalInputErrors<RawScalar>
impl<RawScalar> UnwindSafe for ReciprocalInputErrors<RawScalar>
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more