# IReactiveProperty

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/reactive_property/trait-ireactiveproperty/

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

```rust
trait IReactiveProperty<T>: IObservable<T> + ICancelable + INotifyDataErrorInfo + INotifyPropertyChanged
```

A property that notifies the observers of its value and of its validation errors, and that
can be disposed (`IReactiveProperty<T>`).

Deviation (DEVIATIONS.md, ReactiveUI): upstream's `IsDisposed` interface of
ReactiveUI.Primitives is `ICancelable`, the disposable that says whether it was disposed.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/reactive_property/i_reactive_property.rs#L14)

## Members

- [`value`](#function-value)
- [`set_value`](#function-set_value)
- [`observe_error_changed`](#function-observe_error_changed)
- [`observe_has_errors`](#function-observe_has_errors)
- [`refresh`](#function-refresh)

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

### value

```rust
fn value(self: &Self) -> T
```

The value (`Value { get; }`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/reactive_property/i_reactive_property.rs#L16)

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

### set_value

```rust
fn set_value(self: &Self, value: T)
```

Sets the value (`Value { set; }`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/reactive_property/i_reactive_property.rs#L19)

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

### observe_error_changed

```rust
fn observe_error_changed(self: &Self) -> Rc<dyn IObservable<Option<DataErrors>>>
```

The errors of the property each time they change (`ObserveErrorChanged`); `None` when it
has none.

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

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

### observe_has_errors

```rust
fn observe_has_errors(self: &Self) -> Rc<dyn IObservable<bool>>
```

Whether the property has validation errors, each time its errors change
(`ObserveHasErrors`).

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

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

### refresh

```rust
fn refresh(self: &Self)
```

Notifies the current value again, even when it did not change (`Refresh`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/reactive_property/i_reactive_property.rs#L30)

## Trait implementations

- [`IReactiveProperty<T>`](/docs/0.5.0/api/ferroui-reactiveui/reactive_property/trait-ireactiveproperty/)

## Availability

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