# ModelType

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-build/type_system/struct-modeltype/

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

```rust
struct ModelType
```

A type of the build-time type system.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/type_system/types.rs#L131)

## Members

- [`key`](#function-key)
- [`kind`](#function-kind)
- [`origin`](#function-origin)
- [`is_opaque`](#function-is_opaque)
- [`handles`](#function-handles)
- [`as_type`](#function-as_type)
- [`members`](#function-members)

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

### key

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

The identity of the type: its full name with its type arguments.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/type_system/types.rs#L244)

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

### kind

```rust
fn kind(self: &Self) -> ModelTypeKind
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/type_system/types.rs#L248)

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

### origin

```rust
fn origin(self: &Self) -> &ModelTypeOrigin
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/type_system/types.rs#L252)

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

### is_opaque

```rust
fn is_opaque(self: &Self) -> bool
```

Whether the type is a Rust type no model declares: assignable only to itself and
to `System.Object`, without members.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/type_system/types.rs#L258)

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

### handles

```rust
fn handles(self: &Self) -> Vec<String>
```

The Rust types that hold values of the type, as canonical text, the untyped
(canonical) form first. Empty for types without values and for synthetic types
whose values no declaration can name.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/type_system/types.rs#L265)

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

### as_type

```rust
fn as_type(self: &Self) -> Rc<dyn IXamlType>
```

This type as a type system handle.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/type_system/types.rs#L285)

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

### members

```rust
fn members(self: &Self) -> Rc<ModelMembers>
```

The projected members, projecting them on first use.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/type_system/types.rs#L305)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `IXamlType`

## Availability

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