# shrinkage::FitError

Shrinkage for Rust · 0.3.0

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

```rust
pub enum FitError<E = std::convert::Infallible>
```

Input, numerical, or backend failure. Backend errors retain their type. 

The default source type is [`Infallible`](<https://doc.rust-lang.org/core/convert/type.Infallible.html>), used by prediction and in-memory matrix backends. Optimization iteration limits are reported in the fitted result. 

<a id="variants"></a>

## Variants

<a id="variant-Backend"></a>

### `Backend`

```rust
Backend { operation: &'static str, source: E }
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

A matrix backend failed while computing statistics or a design product. 

<a id="variant-Backend-field-operation"></a>

#### `operation`

```rust
operation: &'static str
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

Operation that requested the backend capability. 

<a id="variant-Backend-field-source"></a>

#### `source`

```rust
source: E
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

Original backend error. 

<a id="variant-InvalidInput"></a>

### `InvalidInput`

```rust
InvalidInput { message: String }
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

Invalid data, dimensions, options, or backend-provided statistics. 

<a id="variant-InvalidInput-field-message"></a>

#### `message`

```rust
message: String
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

Description of the invalid input, including its location when available. 

<a id="variant-LineSearchFailure"></a>

### `LineSearchFailure`

```rust
LineSearchFailure { iteration: usize, step: f64 }
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

Backtracking could not establish the solver's acceptance condition. 

<a id="variant-LineSearchFailure-field-iteration"></a>

#### `iteration`

```rust
iteration: usize
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

Iteration whose trial steps were rejected. 

<a id="variant-LineSearchFailure-field-step"></a>

#### `step`

```rust
step: f64
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

Last attempted step size. 

<a id="variant-NumericalFailure"></a>

### `NumericalFailure`

```rust
NumericalFailure { operation: &'static str, iteration: usize }
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

Arithmetic produced a nonfinite value from finite inputs. 

<a id="variant-NumericalFailure-field-iteration"></a>

#### `iteration`

```rust
iteration: usize
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

Iteration during which the failure occurred; zero denotes initialization. 

<a id="variant-NumericalFailure-field-operation"></a>

#### `operation`

```rust
operation: &'static str
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

Operation that encountered the nonfinite value. 

<a id="variant-UnsupportedCombination"></a>

### `UnsupportedCombination`

```rust
UnsupportedCombination { solver: &'static str, reason: String, suggestion: &'static str }
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

The selected solver cannot support a component or stopping rule. 

<a id="variant-UnsupportedCombination-field-reason"></a>

#### `reason`

```rust
reason: String
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

Missing capability or incompatible selection. 

<a id="variant-UnsupportedCombination-field-solver"></a>

#### `solver`

```rust
solver: &'static str
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

Solver whose requirements were not met. 

<a id="variant-UnsupportedCombination-field-suggestion"></a>

#### `suggestion`

```rust
suggestion: &'static str
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

A supported alternative or the capability needed to proceed. 

<a id="impl-e25498dd1aae83852d32b8b4c1a11a73cf5e8c2d6aa5e8ebaaff7d67bcb8ee85"></a>

## Inherent implementation

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

```rust
impl<E> FitError<E>
```

<a id="impl-347e59fee7fcdcdb3f17ccff42d289bbbc590faa06241f57942da914ea8511b2"></a>

## Implementation of Debug

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

```rust
impl<E: core::fmt::Debug> Debug for FitError<E>
```

<a id="method-fmt-347e59fee7fcdcdb3f17ccff42d289bbbc590faa06241f57942da914ea8511b2"></a>

### `fmt`

```rust
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

<a id="impl-bd6c282a0040d691fb36e8af69797dbce29b45814b598f50309de7cdc7073353"></a>

## Implementation of Display

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

```rust
impl<E: fmt::Display> Display for FitError<E>
```

<a id="method-fmt-bd6c282a0040d691fb36e8af69797dbce29b45814b598f50309de7cdc7073353"></a>

### `fmt`

```rust
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

<a id="impl-017b2f08244fa18282fa1b89e3e395aa0644eadf5dd859483a56b6c0ff5fdd76"></a>

## Implementation of Error

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

```rust
impl<E: Error + 'static> Error for FitError<E>
```

<a id="method-source-017b2f08244fa18282fa1b89e3e395aa0644eadf5dd859483a56b6c0ff5fdd76"></a>

### `source`

```rust
fn source(&self) -> Option<&(dyn Error + 'static)>
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

<a id="impl-0a591207cfb6e8da53640b1def7f85646763c3c051de7aa3de165d7f985f523e"></a>

## Implementation of From

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/cross_validation/error.rs>)

```rust
impl<E> From<FitError<E>> for CrossValidationError<E>
```

<a id="impl-4943f527e109665f839e364b45af06fa513ba8869e9e67dab26dfd32bfad0d81"></a>

## Implementation of From

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

```rust
impl<E> From<NumericalFailure> for FitError<E>
```

<a id="method-from-4943f527e109665f839e364b45af06fa513ba8869e9e67dab26dfd32bfad0d81"></a>

### `from`

```rust
fn from(error: NumericalFailure) -> Self
```

[Source](<https://github.com/jolars/shrinkage/blob/eeafe449edce19d3c552a03060f681ae3891af74/src/error.rs>)

<a id="impl-f95f298d38e0018ab5027714717ba51422a59c7db5f2d12134670196e001560c"></a>

## Implementation of Freeze

```rust
impl<E> Freeze for FitError<E> where E: Freeze
```

<a id="impl-752f528129344c3131dbc9b5b0e0eb4c0070f047f155b21cb16447183962d218"></a>

## Implementation of RefUnwindSafe

```rust
impl<E> RefUnwindSafe for FitError<E> where E: RefUnwindSafe
```

<a id="impl-8a0d6bc83fb651868ba373753a7b22a65cadae2be792ed8b365bb92ed9de04e9"></a>

## Implementation of Send

```rust
impl<E> Send for FitError<E> where E: Send
```

<a id="impl-5d7858a38620e630fbf24d847df14cc49b98b3a629c39209bb010e84ea4302a7"></a>

## Implementation of Sync

```rust
impl<E> Sync for FitError<E> where E: Sync
```

<a id="impl-29128fd9884b897f9072e7492585d09c9082502f65c14820f906b6129649e404"></a>

## Implementation of Unpin

```rust
impl<E> Unpin for FitError<E> where E: Unpin
```

<a id="impl-f0de43390f6ead587761f8790b71eb3bab2eefa814e4149c83d0e0e1cc14c748"></a>

## Implementation of UnsafeUnpin

```rust
impl<E> UnsafeUnpin for FitError<E> where E: UnsafeUnpin
```

<a id="impl-02e2a70af070a45f188c7648b7491abb70e1c7e1f1795efae42ae65169d88136"></a>

## Implementation of UnwindSafe

```rust
impl<E> UnwindSafe for FitError<E> where E: UnwindSafe
```

<a id="impl-1e5682dc18e03c648aa9b125290c107c1e8d96ce8a179a8532e4057da4daf0cd"></a>

## Implementation of Any

```rust
impl<T> Any for T where T: 'static + ?Sized
```

<a id="impl-6c0b25c2c92cdb117802d9c0a4c70afc9a8bfb0da875bc6e66191e2349fcdf3f"></a>

## Implementation of Borrow

```rust
impl<T> Borrow<T> for T where T: ?Sized
```

<a id="impl-796e80d926348273a22b04d8e84f510693b11c06ec57c3c3e2e8c1524094a85c"></a>

## Implementation of BorrowMut

```rust
impl<T> BorrowMut<T> for T where T: ?Sized
```

<a id="impl-8360e4092e7ec4a05a26dd304cd739398f0cacc50c8d08dd5be0223d1a08d02e"></a>

## Implementation of ByRef

```rust
impl<T> ByRef<T> for T
```

<a id="impl-dbb1293b7b5dd80c4d9a98cfdd6843dc7470224c0b1387731cd418da07046d7b"></a>

## Implementation of CastableFrom

```rust
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT where ST: ?Sized, DT: ?Sized
```

<a id="impl-97b65e7dfc44b5ecaa495a3a19fe737914a1e9f8532200cf8f46191314e7d777"></a>

## Implementation of CastableFrom

```rust
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT where ST: ?Sized, DT: ?Sized
```

<a id="impl-c22bdd3b1b677b66eb32d1c182cc1410c7f0c46491dd74e6a659647c238d19ec"></a>

## Implementation of From

```rust
impl<T> From<T> for T
```

<a id="impl-5adf6ca1830f30fbbac655ab8ff394d254954df7ededc7cc833c72fdc87d6f00"></a>

## Implementation of Imply

```rust
impl<T, U> Imply<T> for U where T: ?Sized, U: ?Sized
```

<a id="impl-85eec431edd188129f88290bbcb748e4d2fdc97f7efef3c162b8c252286ffec0"></a>

## Implementation of Into

```rust
impl<T, U> Into<U> for T where U: From<T>
```

<a id="impl-c40268dd59dd3329202d3c0544c62372e98ff3baa8ec442ec00752e024ec1d06"></a>

## Implementation of IntoEither

```rust
impl<T> IntoEither for T
```

<a id="impl-5655b1ef858b34a584cb80104f040c8a4063ced0d281311a0833ed12aefde86e"></a>

## Implementation of Pointable

```rust
impl<T> Pointable for T
```

<a id="impl-8cc2aa01198fc9fa44f08b889f62988d70d2a7f4f0f11f4666d4c08bdaddb22a"></a>

## Implementation of Read

```rust
impl<T> Read<Exclusive, BecauseExclusive> for T where T: ?Sized
```

<a id="impl-5ea09131039c62dd92b119d480a35c7e2b33d2b81dccf0b849f6b1f19f4bda24"></a>

## Implementation of Same

```rust
impl<T> Same for T
```

<a id="impl-7ee6ff38d6674f5edfe4734359062c2a67a572cff5899a89704764822b931c7f"></a>

## Implementation of SupersetOf

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

<a id="impl-82080067a230190c131bfdc130e18618c470dd8f7284e287e520ecdb5ee8eea1"></a>

## Implementation of ToString

```rust
impl<T> ToString for T where T: Display + ?Sized
```

<a id="impl-83960135d00d98080c95a08867729696e36811280c2dd9cf34c1b4fe21c81e18"></a>

## Implementation of TryFrom

```rust
impl<T, U> TryFrom<U> for T where U: Into<T>
```

<a id="impl-1cc495bcaa5112ffb304e7f0de674feca391fd97f47bec86033a9225b72ac05c"></a>

## Implementation of TryInto

```rust
impl<T, U> TryInto<U> for T where U: TryFrom<T>
```
