Skip to main content

CurvesResult

Type Alias CurvesResult 

Source
pub type CurvesResult<T> = Result<T, CurveError>;
Expand description

Type alias representing the result of operations related to curve calculations.

This type alias provides a standardized result type for functions that perform operations with mathematical curves, including interpolation, construction, analysis, and other curve-related operations.

§Type Parameters

  • T - The success value type returned when operations complete successfully.

§Return Value

Returns either:

  • Ok(T) - The operation completed successfully with a value of type T.
  • Err(CurveError) - The operation failed, with a CurveError describing the specific failure.

§Usage

This result type is used throughout the curves module to provide consistent error handling for curve operations. It allows functions to return detailed error information using the CurveError enum when operations fail, while returning the expected value when successful.

Aliased Type§

pub enum CurvesResult<T> {
    Ok(T),
    Err(CurveError),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(CurveError)

Contains the error value