# PropertyChangedObservable

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/struct-propertychangedobservable/

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

```rust
struct PropertyChangedObservable
```

The stream of change notifications of a property across all objects.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_property.rs#L335)

## Members

- [`subscribe`](#function-subscribe)
- [`add_class_handler`](#function-add_class_handler)

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

### subscribe

```rust
fn subscribe(self: &'static Self, handler: impl Fn(&FerroPropertyChangedEventArgs<'_>) -> () + 'static) -> Subscription
```

Subscribes to changes of the property on any object.

Dropping the returned guard removes the handler; call
`detach` to keep it for the life of the
property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_property.rs#L349)

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

### add_class_handler

```rust
fn add_class_handler<TTarget: ObjectType>(self: &'static Self, handler: impl Fn(&TTarget, &FerroPropertyChangedEventArgs<'_>) -> () + 'static) -> Subscription
```

Subscribes a handler that is only invoked for objects of class
`TTarget` (or classes derived from it).

Dropping the returned guard removes the handler; call
`detach` to keep it for the life of the
property, as a class handler registered once for its class does.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_property.rs#L362)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ErasedDestructor`
- `IntoEither`

## Availability

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