# NumberExpressionErrorKind

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/utils/number_expression/enum-numberexpressionerrorkind/

**enum** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
enum NumberExpressionErrorKind
```

What is wrong with an expression.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/number_expression.rs#L134)

## Members

- [`TooLong`](#variant-toolong)
- [`TooManyTokens`](#variant-toomanytokens)
- [`ExpectedNumber`](#variant-expectednumber)
- [`InvalidNumber`](#variant-invalidnumber)
- [`ExpectedOperator`](#variant-expectedoperator)
- [`UnmatchedClosingParenthesis`](#variant-unmatchedclosingparenthesis)
- [`UnmatchedOpeningParenthesis`](#variant-unmatchedopeningparenthesis)
- [`DivisionByZero`](#variant-divisionbyzero)
- [`Overflow`](#variant-overflow)

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

### TooLong

```rust
TooLong
```

The input is longer than 64 KiB.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/number_expression.rs#L136)

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

### TooManyTokens

```rust
TooManyTokens
```

The input has more than 4096 tokens.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/number_expression.rs#L138)

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

### ExpectedNumber

```rust
ExpectedNumber
```

A number (or an opening parenthesis) was expected.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/number_expression.rs#L140)

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

### InvalidNumber

```rust
InvalidNumber
```

The parser of the caller does not read the text as a number.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/number_expression.rs#L142)

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

### ExpectedOperator

```rust
ExpectedOperator
```

An operator (or a closing parenthesis) was expected.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/number_expression.rs#L144)

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

### UnmatchedClosingParenthesis

```rust
UnmatchedClosingParenthesis
```

A closing parenthesis has no opening one.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/number_expression.rs#L146)

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

### UnmatchedOpeningParenthesis

```rust
UnmatchedOpeningParenthesis
```

An opening parenthesis is not closed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/number_expression.rs#L148)

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

### DivisionByZero

```rust
DivisionByZero
```

A division by zero. WinUI's NumberBox gives the expression the value NaN.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/number_expression.rs#L150)

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

### Overflow

```rust
Overflow
```

A result is not a value of the number type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/utils/number_expression.rs#L152)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`ResourceKeyObject`](/docs/0.5.0/api/ferroui-base/controls/trait-resourcekeyobject/)
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
