# FerroObjectObservableForProperty

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui-controls/struct-ferroobjectobservableforproperty/

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

```rust
struct FerroObjectObservableForProperty
```

Observes a property of a FerroUI object through the registered property of that name
(`FerroObjectObservableForProperty`).

The observable raises after the value changes. The property system raises no notification
before a change, so a request for one receives the same observable.

The object is the `object` of the `PropertyOwner`, in one of the forms
`FerroObjectHandles::object_of` recognises; the steps of
`ferro_property` give it.

Deviation (DEVIATIONS.md, ReactiveUI controls): the affinity is computed on the object (as
every observer of the port does), and the registered property is found by the class of the
object. The changes carry no value, as the changes of every observer of the port do: the
reader reads the value from the object.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/ferro_object_observable_for_property.rs#L27)

## Members

- [`FERRO_PROPERTY_AFFINITY`](#assoc_const-ferro_property_affinity)
- [`new`](#function-new)
- [`find_property`](#function-find_property)

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

### FERRO_PROPERTY_AFFINITY

```rust
const FERRO_PROPERTY_AFFINITY: i32
```

The affinity of a registered property, the same as a dependency property of WPF
(`FerroPropertyAffinity`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/ferro_object_observable_for_property.rs#L32)

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

### new

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

The observer (`new FerroObjectObservableForProperty()`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/ferro_object_observable_for_property.rs#L35)

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

### find_property

```rust
fn find_property(object: &FerroObject, property_name: &str) -> Option<&'static FerroProperty>
```

The property registered on the class of `object` under `property_name`, or `None` when the
class registers none by that name; the comparison is case-sensitive (`FindProperty`).

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`CreatesObservableForPropertyMixins`](/docs/0.5.0/api/ferroui-reactiveui/binding/interfaces/trait-createsobservableforpropertymixins/)
- `Debug`
- `Default`
- `Clone`
- `Copy`
- [`ICreatesObservableForProperty`](/docs/0.5.0/api/ferroui-reactiveui/binding/interfaces/trait-icreatesobservableforproperty/)

## Availability

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