# BindToMixins

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/binding/mixins/trait-bindtomixins/

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

```rust
trait BindToMixins<V: 'static>
```

The write of the values of an observable to a property (`ReactiveUIBindingExtensions.BindTo`);
implemented for every `Rc<dyn IObservable<V>>`.

Each value is converted to the type of the property (by the converter the call names, else by
the one registered for the pair of types, else passed when it already is of that type; a value
that cannot be converted is not written), and written on the thread that owns the target when
its platform has one. A value the property already holds is not written again. A registered
`IPropertyBindingHook` may refuse the binding, which binds
nothing.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/mixins/reactive_ui_binding_extensions_bind_to.rs#L22)

## Members

- [`bind_to`](#function-bind_to)
- [`bind_to_with`](#function-bind_to_with)

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

### bind_to

```rust
fn bind_to<T, TT>(self: &Self, target: impl Into<Option<Rc<T>>>, property: SettableProperty<Rc<T>, TT>) -> Rc<dyn IDisposable>
where T: 'static,
      TT: Clone + PartialEq + 'static
```

Writes each value to `property` of `target`; nothing is bound when `target` is `None`
(`BindTo(TTarget?, Expression<Func<TTarget, TTargetValue?>>)`).

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

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

### bind_to_with

```rust
fn bind_to_with<T, TT>(self: &Self, target: impl Into<Option<Rc<T>>>, property: SettableProperty<Rc<T>, TT>, conversion_hint: Option<Rc<dyn Any>>, converter_override: Option<Rc<dyn IBindingTypeConverter>>) -> Rc<dyn IDisposable>
where T: 'static,
      TT: Clone + PartialEq + 'static
```

`bind_to`, converting with `converter_override` instead of a registered
converter when it is given, and handing `conversion_hint` to the converter
(`BindTo(..., object? conversionHint)`, `BindTo(..., IBindingTypeConverter? converterOverride)`
and `BindTo(..., object? conversionHint, IBindingTypeConverter? converterOverride)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/mixins/reactive_ui_binding_extensions_bind_to.rs#L41)

## Trait implementations

- [`BindToMixins<V>`](/docs/0.5.0/api/ferroui-reactiveui/binding/mixins/trait-bindtomixins/)

## Availability

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