# FormatError

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/utilities/span_string_tokenizer/struct-formaterror/

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

```rust
struct FormatError
```

Error returned when a string is not in the expected format.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/span_string_tokenizer.rs#L14)

## Members

- [`new`](#function-new)
- [`from_string`](#function-from_string)
- [`invalid_input`](#function-invalid_input)
- [`message`](#function-message)

<a id="function-new"></a>

### new

```rust
const fn new(message: &'static str) -> Self
```

Creates an error with a static message.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/span_string_tokenizer.rs#L21)

<a id="function-from_string"></a>

### from_string

```rust
fn from_string(message: String) -> Self
```

Creates an error with a computed message.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/span_string_tokenizer.rs#L29)

<a id="function-invalid_input"></a>

### invalid_input

```rust
fn invalid_input(input: &str) -> Self
```

Creates the error reported when a number cannot be parsed from `input`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/span_string_tokenizer.rs#L36)

<a id="function-message"></a>

### message

```rust
fn message(self: &Self) -> &str
```

Gets the error message.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/utilities/span_string_tokenizer.rs#L44)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`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/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ToString`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Default`
- `Display`
- [`Error`](/docs/0.5.0/api/ferroui-dynamic-data/kernel/struct-error/)

## Availability

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