Enum varpro::model::builder::error::ModelBuildError[][src]

pub enum ModelBuildError {
    DuplicateParameterNames {
        function_parameters: Vec<String>,
    },
    EmptyParameters,
    FunctionParameterNotInModel {
        function_parameter: String,
    },
    InvalidDerivative {
        parameter: String,
        function_parameters: Vec<String>,
    },
    DuplicateDerivative {
        parameter: String,
    },
    MissingDerivative {
        missing_parameter: String,
        function_parameters: Vec<String>,
    },
    EmptyModel,
    UnusedParameter {
        parameter: String,
    },
    IncorrectParameterCount {
        params: Vec<String>,
        string_params_count: usize,
        function_argument_count: usize,
    },
    CommaInParameterNameNotAllowed {
        param_name: String,
    },
}

An error structure that contains error variants that occur when building a model.

Variants

DuplicateParameterNames

Model or function parameters contain duplicates

Fields of DuplicateParameterNames

function_parameters: Vec<String>
EmptyParameters

Model or function parameter list is empty. To add functions that are independent of model parameters, use the interface for adding invariant functions.

FunctionParameterNotInModel

A function was added to the model which depends on parameters which are not in the model

Fields of FunctionParameterNotInModel

function_parameter: String
InvalidDerivative

Tried to provide a partial derivative with respect to a parameter that a function does not depend on

Fields of InvalidDerivative

parameter: Stringfunction_parameters: Vec<String>
DuplicateDerivative

Tried to provide the same partial derivative twice.

Fields of DuplicateDerivative

parameter: String
MissingDerivative

Not all partial derivatives for a function where given. Each function must be given a partial derivative with respect to each parameter it depends on.

Fields of MissingDerivative

missing_parameter: Stringfunction_parameters: Vec<String>
EmptyModel

Tried to construct a model without base functions

UnusedParameter

The model depends on a certain parameter that none of the base functions depend on.

Fields of UnusedParameter

parameter: String
IncorrectParameterCount

This error indicates that the more or fewer string parameters where provided as function parameters than the actual variadic function takes. This might accidentally happen when giving a derivative that does not depend on a certain parameter, whereas the base function does. However, the library requires that the derivatives take all the parameters its base function takes in the same order.

Fields of IncorrectParameterCount

params: Vec<String>string_params_count: usizefunction_argument_count: usize
CommaInParameterNameNotAllowed

Parameter names may not contain a comma separator, because this is most likely caused by a typo, i.e. ["tau,phi"], instead of actually ["tau","phi"]. So this is forbidden in order to help spotting these hard to find errors.

Fields of CommaInParameterNameNotAllowed

param_name: String

Trait Implementations

impl Clone for ModelBuildError[src]

impl Debug for ModelBuildError[src]

impl Display for ModelBuildError[src]

impl Error for ModelBuildError where
    Self: Debug + Display
[src]

impl ErrorCompat for ModelBuildError[src]

impl<ScalarType> From<ModelBuildError> for SeparableModelBuilder<ScalarType> where
    ScalarType: Scalar
[src]

create a SeparableModelBuilder which contains an error variant

impl<ScalarType> From<ModelBuildError> for SeparableModelBuilderProxyWithDerivatives<ScalarType> where
    ScalarType: Scalar
[src]

impl<__T0> IntoError<ModelBuildError> for DuplicateParameterNames<__T0> where
    ModelBuildError: Error + ErrorCompat,
    __T0: Into<Vec<String>>, 
[src]

type Source = NoneError

The underlying error

impl IntoError<ModelBuildError> for EmptyParameters where
    ModelBuildError: Error + ErrorCompat
[src]

type Source = NoneError

The underlying error

impl<__T0> IntoError<ModelBuildError> for FunctionParameterNotInModel<__T0> where
    ModelBuildError: Error + ErrorCompat,
    __T0: Into<String>, 
[src]

type Source = NoneError

The underlying error

impl<__T0, __T1> IntoError<ModelBuildError> for InvalidDerivative<__T0, __T1> where
    ModelBuildError: Error + ErrorCompat,
    __T0: Into<String>,
    __T1: Into<Vec<String>>, 
[src]

type Source = NoneError

The underlying error

impl<__T0> IntoError<ModelBuildError> for DuplicateDerivative<__T0> where
    ModelBuildError: Error + ErrorCompat,
    __T0: Into<String>, 
[src]

type Source = NoneError

The underlying error

impl<__T0, __T1> IntoError<ModelBuildError> for MissingDerivative<__T0, __T1> where
    ModelBuildError: Error + ErrorCompat,
    __T0: Into<String>,
    __T1: Into<Vec<String>>, 
[src]

type Source = NoneError

The underlying error

impl IntoError<ModelBuildError> for EmptyModel where
    ModelBuildError: Error + ErrorCompat
[src]

type Source = NoneError

The underlying error

impl<__T0> IntoError<ModelBuildError> for UnusedParameter<__T0> where
    ModelBuildError: Error + ErrorCompat,
    __T0: Into<String>, 
[src]

type Source = NoneError

The underlying error

impl<__T0, __T1, __T2> IntoError<ModelBuildError> for IncorrectParameterCount<__T0, __T1, __T2> where
    ModelBuildError: Error + ErrorCompat,
    __T0: Into<Vec<String>>,
    __T1: Into<usize>,
    __T2: Into<usize>, 
[src]

type Source = NoneError

The underlying error

impl<__T0> IntoError<ModelBuildError> for CommaInParameterNameNotAllowed<__T0> where
    ModelBuildError: Error + ErrorCompat,
    __T0: Into<String>, 
[src]

type Source = NoneError

The underlying error

impl PartialEq<ModelBuildError> for ModelBuildError[src]

impl StructuralPartialEq for ModelBuildError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsErrorSource for T where
    T: 'static + Error
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,