# ViewRegistrationOptions

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/binding/view/struct-viewregistrationoptions/

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

```rust
struct ViewRegistrationOptions
```

The options of a view registration: upstream's attributes of a view class, as data.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/view/view_registrations.rs#L18)

## Members

- [`contract`](#struct_field-contract)
- [`single_instance`](#struct_field-single_instance)
- [`exclude`](#struct_field-exclude)
- [`new`](#function-new)
- [`with_contract`](#function-with_contract)
- [`with_single_instance`](#function-with_single_instance)
- [`with_exclude`](#function-with_exclude)

<a id="struct_field-contract"></a>

### contract

```rust
contract: Option<super::ViewContract>
```

The contract the view is registered under (`[ViewContract("...")]`); `None` for the default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/view/view_registrations.rs#L20)

<a id="struct_field-single_instance"></a>

### single_instance

```rust
single_instance: Option<super::SingleInstanceView>
```

Whether the view is created once and reused (`[SingleInstanceView]`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/view/view_registrations.rs#L22)

<a id="struct_field-exclude"></a>

### exclude

```rust
exclude: Option<super::ExcludeFromViewRegistration>
```

Whether the view is left out of the dispatch (`[ExcludeFromViewRegistration]`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/view/view_registrations.rs#L24)

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

### new

```rust
fn new() -> Self
```

No option: the default contract, a new view for each resolution.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/view/view_registrations.rs#L29)

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

### with_contract

```rust
fn with_contract(self: Self, contract: ViewContract) -> Self
```

The options with `contract`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/view/view_registrations.rs#L34)

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

### with_single_instance

```rust
fn with_single_instance(self: Self) -> Self
```

The options with `SingleInstanceView`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/view/view_registrations.rs#L40)

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

### with_exclude

```rust
fn with_exclude(self: Self) -> Self
```

The options with `ExcludeFromViewRegistration`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/view/view_registrations.rs#L46)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `Clone`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`

## Availability

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