# ReactiveUIBuilderExt

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/builder/trait-reactiveuibuilderext/

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

```rust
trait ReactiveUIBuilderExt: IReactiveUIBuilder
```

The generic methods of [`IReactiveUIBuilder`](/docs/0.5.0/api/ferroui-reactiveui/builder/trait-ireactiveuibuilder/) (`RegisterView<TView, TViewModel>`,
`RegisterViewModel<TViewModel>`, `WithPlatformModule<T>`, `WithSuspensionHost<TAppState>`,
`WithConverter<TFrom, TTo>`), which every builder has.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/builder/i_reactive_ui_builder.rs#L149)

## Members

- [`register_singleton_view`](#function-register_singleton_view)
- [`register_singleton_view_model`](#function-register_singleton_view_model)
- [`register_view`](#function-register_view)
- [`register_view_model`](#function-register_view_model)
- [`register_constant_view_model`](#function-register_constant_view_model)
- [`with_platform_module`](#function-with_platform_module)
- [`with_suspension_host_of`](#function-with_suspension_host_of)
- [`with_converter_of`](#function-with_converter_of)
- [`with_converter_of_factory`](#function-with_converter_of_factory)

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

### register_singleton_view

```rust
fn register_singleton_view<V: IViewForOf<VM> + Default + 'static, VM: IReactiveObject>(self: &Self) -> &dyn IReactiveUIBuilder
```

Registers `V` as the view of `VM`, one view created at the first resolution
(`RegisterSingletonView<TView, TViewModel>()`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/builder/i_reactive_ui_builder.rs#L152)

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

### register_singleton_view_model

```rust
fn register_singleton_view_model<VM: IReactiveObject + Default>(self: &Self) -> &dyn IReactiveUIBuilder
```

Registers `VM`, one view model created at the first resolution
(`RegisterSingletonViewModel<TViewModel>()`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/builder/i_reactive_ui_builder.rs#L160)

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

### register_view

```rust
fn register_view<V: IViewForOf<VM> + Default + 'static, VM: IReactiveObject>(self: &Self) -> &dyn IReactiveUIBuilder
```

Registers `V` as the view of `VM`, a new view at each resolution
(`RegisterView<TView, TViewModel>()`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/builder/i_reactive_ui_builder.rs#L168)

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

### register_view_model

```rust
fn register_view_model<VM: IReactiveObject + Default>(self: &Self) -> &dyn IReactiveUIBuilder
```

Registers `VM`, a new view model at each resolution (`RegisterViewModel<TViewModel>()`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/builder/i_reactive_ui_builder.rs#L175)

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

### register_constant_view_model

```rust
fn register_constant_view_model<VM: IReactiveObject + Default>(self: &Self) -> &dyn IReactiveUIBuilder
```

Registers one view model of `VM`, created now, as a constant
(`RegisterConstantViewModel<TViewModel>()`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/builder/i_reactive_ui_builder.rs#L183)

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

### with_platform_module

```rust
fn with_platform_module<T: IWantsToRegisterStuff + Default>(self: &Self) -> &dyn IReactiveUIBuilder
```

Applies the registrations of a new `T` at once (`WithPlatformModule<T>()`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/builder/i_reactive_ui_builder.rs#L190)

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

### with_suspension_host_of

```rust
fn with_suspension_host_of<T: 'static>(self: &Self) -> &dyn IReactiveUIBuilder
```

Sets a suspension host of an application state of type `T`
(`WithSuspensionHost<TAppState>()`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/builder/i_reactive_ui_builder.rs#L196)

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

### with_converter_of

```rust
fn with_converter_of<F: 'static, T: 'static>(self: &Self, converter: Rc<dyn IBindingTypeConverterOf<F, T>>) -> &dyn IReactiveUIBuilder
```

Registers a converter of `F` to `T` (`WithConverter<TFrom, TTo>(IBindingTypeConverter<TFrom, TTo>)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/builder/i_reactive_ui_builder.rs#L201)

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

### with_converter_of_factory

```rust
fn with_converter_of_factory<F: 'static, T: 'static>(self: &Self, factory: impl FnOnce() -> Rc<dyn IBindingTypeConverterOf<F, T>>) -> &dyn IReactiveUIBuilder
```

Registers the converter of `F` to `T` that `factory` creates
(`WithConverter<TFrom, TTo>(Func<IBindingTypeConverter<TFrom, TTo>>)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/builder/i_reactive_ui_builder.rs#L207)

## Trait implementations

- [`ReactiveUIBuilderExt`](/docs/0.5.0/api/ferroui-reactiveui/builder/trait-reactiveuibuilderext/)

## Availability

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