pub type AbsRealErrors<RawReal> = FunctionErrors<AbsInputErrors<RawReal>, <RawReal as RawScalarTrait>::ValidationErrors>;
Expand description
A type alias for FunctionErrors
, specialized for errors that can occur during
the computation of the absolute value of a real number.
It combines input validation errors specific to the abs
operation on real numbers
with potential validation errors of the resulting real number.
§Generic Parameters
RawReal
: A type that implementsRawRealTrait
. This defines:- The error type for the input:
AbsInputErrors<RawReal>
. - The raw error type for the output:
<RawReal as RawScalarTrait>::ValidationErrors
.
- The error type for the input:
§Variants
This type alias wraps FunctionErrors
, which has the following variants:
Input { source: AbsInputErrors<RawReal> }
: Indicates that the input real number provided for absolute value computation was invalid. Thesource
field contains anAbsInputErrors
detailing the specific input failure.Output { source: <RawReal as RawScalarTrait>::ValidationErrors }
: Indicates that the computed absolute value (a real number) itself failed validation. This typically means the result of theabs
operation yielded a non-finite value (NaN or Infinity). Thesource
field contains the raw validation error for the output.
Aliased Type§
pub enum AbsRealErrors<RawReal> {
Input {
source: AbsInputErrors<RawReal>,
},
Output {
source: <RawReal as RawScalarTrait>::ValidationErrors,
},
}
Variants§
Input
Error due to invalid input values.
This variant is returned when initial validation of the function’s arguments
fails according to the defined validation policy (e.g.,
StrictFinitePolicy
) or due to
domain-specific constraints (e.g., negative input to a real logarithm).
Fields
source: AbsInputErrors<RawReal>
The source error that occurred during input validation. This provides specific details about why the input was considered invalid.
Output
Error due to the computed output failing validation.
This variant is returned if the result of the computation, even from valid inputs, fails validation according to the defined policy. This typically means the result was non-finite (NaN or Infinity) or otherwise did not meet the criteria for a valid output.
Fields
source: <RawReal as RawScalarTrait>::ValidationErrors
The source error that occurred during output validation. This provides specific details about why the computed output was considered invalid.