# ReactiveUIBindingBuilder

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

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

```rust
struct ReactiveUIBindingBuilder
```

The builder of ReactiveUI.Binding (`ReactiveUIBindingBuilder`): it configures the services of
the property observation and the bindings, the converters and the platform modules on a Splat
`AppBuilder`, and is the application it builds.

The builder is shared as an `Rc`; its methods take `self: &Rc<Self>` and return the builder, to
chain the calls:

```
use ferroui_reactiveui::{RxBindingBuilder, ViewLocator};

RxBindingBuilder::reset_for_testing();
RxBindingBuilder::create_reactive_ui_binding_builder().with_core_services().build_app();
let _locator = ViewLocator::current();
```

Deviation (DEVIATIONS.md, ReactiveUI): upstream subclasses `AppBuilder` and overrides
`WithCoreServices`; here the builder wraps one and implements `IAppBuilder`, adding its core
services before it builds the inner builder. The overloads of upstream's methods are the
methods of the builder (`self: &Rc<Self>`, returning the builder) and those of
[`IReactiveUIBindingBuilder`](/docs/0.5.0/api/ferroui-reactiveui/binding/builder/trait-ireactiveuibindingbuilder/) (object safe); the null checks of the arguments have no
counterpart.

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

## Members

- [`new`](#function-new)
- [`find`](#function-find)
- [`converter_service`](#function-converter_service)
- [`resolver`](#function-resolver)
- [`with_core_services`](#function-with_core_services)
- [`with_platform_module`](#function-with_platform_module)
- [`with_registration`](#function-with_registration)
- [`with_converter`](#function-with_converter)
- [`with_fallback_converter`](#function-with_fallback_converter)
- [`with_set_method_converter`](#function-with_set_method_converter)
- [`with_command_binder`](#function-with_command_binder)
- [`configure_view_locator`](#function-configure_view_locator)
- [`build_app`](#function-build_app)

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

### new

```rust
fn new(resolver: Rc<dyn IMutableDependencyResolver>, current: Option<Rc<dyn IReadonlyDependencyResolver>>) -> Rc<Self>
```

A builder over `resolver`, reading the configured services from `current`; it initializes
Splat on the resolver and registers its `ConverterService` there
(`ReactiveUIBindingBuilder(IMutableDependencyResolver, IReadonlyDependencyResolver?)`).

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

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

### find

```rust
fn find(app_builder: &dyn IAppBuilder) -> Option<Rc<ReactiveUIBindingBuilder>>
```

The builder behind `app_builder`, when it is a `ReactiveUIBindingBuilder` (upstream's
`appBuilder is IReactiveUIBindingBuilder`).

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

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

### converter_service

```rust
fn converter_service(self: &Self) -> &Rc<ConverterService>
```

The converter service of the bindings, with its three registries (`ConverterService`).

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

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

### resolver

```rust
fn resolver(self: &Self) -> Rc<dyn IMutableDependencyResolver>
```

The resolver the builder registers with (`CurrentMutable`).

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

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

### with_core_services

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

Registers the core services once (`WithCoreServices`): the default converters, the
observers of `PropertyChanged` and of plain objects (`ReactiveUIBindingModule`), and a
`DefaultViewLocator` as the `dyn IViewLocator`. A second call registers nothing.

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

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

### with_platform_module

```rust
fn with_platform_module<M: IModule + 'static>(self: &Rc<Self>, module: M) -> Rc<Self>
```

Adds the module of a platform, applied at build time (`WithPlatformModule<T>(T)`).

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

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

### with_registration

```rust
fn with_registration(self: &Rc<Self>, configure_action: impl FnOnce(&dyn IMutableDependencyResolver) -> ()) -> Rc<Self>
```

Runs `configure_action` on the resolver now (`WithRegistration`).

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

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

### with_converter

```rust
fn with_converter(self: &Rc<Self>, converter: Rc<dyn IBindingTypeConverter>) -> Rc<Self>
```

Registers a converter of a pair of types in the typed registry (`WithConverter`).

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

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

### with_fallback_converter

```rust
fn with_fallback_converter(self: &Rc<Self>, converter: Rc<dyn IBindingFallbackConverter>) -> Rc<Self>
```

Registers a fallback converter (`WithFallbackConverter`).

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

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

### with_set_method_converter

```rust
fn with_set_method_converter(self: &Rc<Self>, converter: Rc<dyn ISetMethodBindingConverter>) -> Rc<Self>
```

Registers a converter of set methods (`WithSetMethodConverter`).

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

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

### with_command_binder

```rust
fn with_command_binder(self: &Rc<Self>, binder: Rc<dyn ICreatesCommandBinding>) -> Rc<Self>
```

Registers `binder`, a binder of commands to controls, as a lazy singleton of
`dyn ICreatesCommandBinding` (`WithCommandBinder`).

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

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

### configure_view_locator

```rust
fn configure_view_locator(self: &Rc<Self>, configure: impl FnOnce(&ViewMappingBuilder<'_>) -> ()) -> Rc<Self>
```

Creates a `DefaultViewLocator` with the mappings `configure` adds, and registers it as the
`dyn IViewLocator` (`ConfigureViewLocator`).

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

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

### build_app

```rust
fn build_app(self: &Rc<Self>) -> Rc<dyn IReactiveUIBindingInstance>
```

Builds the application, publishes the `ConverterService` through `BindingConverters` and
marks ReactiveUI.Binding initialized (`BuildApp`). It panics with an
`InvalidOperationException` message when the build gives no resolver.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `Debug`
- [`IAppInstance`](/docs/0.5.0/api/ferroui-splat/builder/trait-iappinstance/)
- [`IReactiveUIBindingInstance`](/docs/0.5.0/api/ferroui-reactiveui/binding/builder/trait-ireactiveuibindinginstance/)
- [`IAppBuilder`](/docs/0.5.0/api/ferroui-splat/builder/trait-iappbuilder/)
- [`IReactiveUIBindingBuilder`](/docs/0.5.0/api/ferroui-reactiveui/binding/builder/trait-ireactiveuibindingbuilder/)

## Availability

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