# TemplateResult

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/templates/struct-templateresult/

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

```rust
struct TemplateResult<T>
```

The result of building a template: the built object and the name scope
its named parts were registered in.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/templates/template_result.rs#L6)

## Members

- [`new`](#function-new)
- [`result`](#function-result)
- [`name_scope`](#function-name_scope)
- [`deconstruct`](#function-deconstruct)

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

### new

```rust
fn new(result: T, name_scope: NameScopeRef) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/templates/template_result.rs#L12)

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

### result

```rust
fn result(self: &Self) -> &T
```

The built object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/templates/template_result.rs#L17)

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

### name_scope

```rust
fn name_scope(self: &Self) -> &NameScopeRef
```

The name scope of the built object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/templates/template_result.rs#L22)

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

### deconstruct

```rust
fn deconstruct(self: Self) -> (T, NameScopeRef)
```

Splits the result into the built object and its name scope.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/templates/template_result.rs#L27)

## Trait implementations

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

## Availability

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