pub enum SqrtRealInputErrors<RawReal: RawRealTrait> {
NegativeValue {
value: RawReal,
backtrace: Backtrace,
},
ValidationError {
source: <RawReal as RawScalarTrait>::ValidationErrors,
},
}
Expand description
Errors that can occur during the input validation phase when attempting to compute the square root of a real number.
This enum is used as the source for the Input
variant of SqrtRealErrors
.
It is generic over RawReal: RawRealTrait
, which defines the specific raw real number type and its associated
validation error type.
§Variants
Self::NegativeValue
: The input value is negative, which is not allowed for real square roots.Self::ValidationError
: The input value failed basic validation checks (e.g., NaN, infinity, subnormal) according to the validation policy.
Variants§
NegativeValue
The input value for the square root computation is negative.
The square root of a negative real number is not a real number.
ValidationError
The input value failed basic validation checks (e.g., it is NaN, infinite, or subnormal).
This error occurs if the input value itself is considered invalid
according to the validation policy (e.g., StrictFinitePolicy
),
before the domain-specific check (like negativity) for the square root
operation is performed.
Fields
source: <RawReal as RawScalarTrait>::ValidationErrors
The source error that occurred during validation.
Trait Implementations§
Source§impl<RawReal: Debug + RawRealTrait> Debug for SqrtRealInputErrors<RawReal>
impl<RawReal: Debug + RawRealTrait> Debug for SqrtRealInputErrors<RawReal>
Source§impl<RawReal> Display for SqrtRealInputErrors<RawReal>where
RawReal: Debug + RawRealTrait,
impl<RawReal> Display for SqrtRealInputErrors<RawReal>where
RawReal: Debug + RawRealTrait,
Source§impl<RawReal: RawRealTrait> Error for SqrtRealInputErrors<RawReal>
impl<RawReal: RawRealTrait> Error for SqrtRealInputErrors<RawReal>
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
)