# Model

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/data/model/trait-model/

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

```rust
trait Model: PartialEq + Sized + 'static
```

A model type that declares its binding metadata.

Implement it with `ferro_model!`; create instances
with `Model::new_model` (or call `Model::register` once per thread
before the first binding touches an instance).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/model/model_type.rs#L295)

## Members

- [`describe`](#function-describe)
- [`register`](#function-register)
- [`new_model`](#function-new_model)

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

### describe

```rust
fn describe(builder: ModelTypeBuilder<Self>) -> ModelTypeBuilder<Self>
```

Describes the type's properties, methods and notification interfaces.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/model/model_type.rs#L297)

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

### register

```rust
fn register()
```

Registers the metadata on the current thread, once.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/model/model_type.rs#L300)

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

### new_model

```rust
fn new_model(value: Self) -> Rc<Self>
```

Wraps an instance into its shared, bindable form.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/model/model_type.rs#L307)

## Availability

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