# BindingAffinity

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

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

```rust
struct BindingAffinity
```

The affinity scores shared by the type converters, the property observers and the command
binders: a higher value is a stronger match, and zero means that the candidate does not apply
(`BindingAffinity`).

`DEFAULT_INTERNAL_TYPE_CONVERTER`, `DEFAULT_EVENT`, `EXPLICIT` and `EXACT_TYPE` carry the
values of ReactiveUI's scores of those names; the scores of the platforms are upstream's own,
kept so that an observer of another platform ranks as it does there.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/binding_affinity.rs#L10)

## Members

- [`FALLBACK`](#assoc_const-fallback)
- [`DEFAULT_INTERNAL_TYPE_CONVERTER`](#assoc_const-default_internal_type_converter)
- [`DEFAULT_EVENT`](#assoc_const-default_event)
- [`WPF_DEPENDENCY_OBJECT`](#assoc_const-wpf_dependency_object)
- [`EVENT_ENABLED_CONTROL`](#assoc_const-event_enabled_control)
- [`EXPLICIT`](#assoc_const-explicit)
- [`WIN_UI_DEPENDENCY_OBJECT`](#assoc_const-win_ui_dependency_object)
- [`WIN_FORMS_EVENT`](#assoc_const-win_forms_event)
- [`EXACT_TYPE`](#assoc_const-exact_type)
- [`KVO`](#assoc_const-kvo)

<a id="assoc_const-fallback"></a>

### FALLBACK

```rust
const FALLBACK: i32
```

The affinity of the observer of plain objects, the lowest match (`Fallback`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/binding_affinity.rs#L14)

<a id="assoc_const-default_internal_type_converter"></a>

### DEFAULT_INTERNAL_TYPE_CONVERTER

```rust
const DEFAULT_INTERNAL_TYPE_CONVERTER: i32
```

The affinity of the built-in value and string converters (`DefaultInternalTypeConverter`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/binding_affinity.rs#L17)

<a id="assoc_const-default_event"></a>

### DEFAULT_EVENT

```rust
const DEFAULT_EVENT: i32
```

The affinity of a binding to the conventional default event of a type (`DefaultEvent`).

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

<a id="assoc_const-wpf_dependency_object"></a>

### WPF_DEPENDENCY_OBJECT

```rust
const WPF_DEPENDENCY_OBJECT: i32
```

The affinity of a dependency property of WPF (`WpfDependencyObject`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/binding_affinity.rs#L23)

<a id="assoc_const-event_enabled_control"></a>

### EVENT_ENABLED_CONTROL

```rust
const EVENT_ENABLED_CONTROL: i32
```

The affinity of the command binding of a control with an enabled event
(`EventEnabledControl`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/binding_affinity.rs#L27)

<a id="assoc_const-explicit"></a>

### EXPLICIT

```rust
const EXPLICIT: i32
```

The affinity of an explicit or interface-based match, such as `INotifyPropertyChanged` or a
named event (`Explicit`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/binding_affinity.rs#L31)

<a id="assoc_const-win_ui_dependency_object"></a>

### WIN_UI_DEPENDENCY_OBJECT

```rust
const WIN_UI_DEPENDENCY_OBJECT: i32
```

The affinity of a dependency property of WinUI (`WinUiDependencyObject`).

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

<a id="assoc_const-win_forms_event"></a>

### WIN_FORMS_EVENT

```rust
const WIN_FORMS_EVENT: i32
```

The affinity of the event-based property observation of WinForms (`WinFormsEvent`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/binding_affinity.rs#L37)

<a id="assoc_const-exact_type"></a>

### EXACT_TYPE

```rust
const EXACT_TYPE: i32
```

The affinity of a strong, exact-type match, such as `IReactiveObject` (`ExactType`).

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

<a id="assoc_const-kvo"></a>

### KVO

```rust
const KVO: i32
```

The affinity of key-value observing on Apple platforms (`Kvo`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/binding_affinity.rs#L43)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`

## Availability

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