# RoutedEventObservable

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

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

```rust
struct RoutedEventObservable
```

The stream of `(sender, args)` notifications of a routed event: one for
every element on the route of every raise. This is what class handlers
are built on.

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

## Members

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

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

### subscribe

```rust
fn subscribe(self: &'static Self, handler: impl Fn(&Interactive, &dyn IRoutedEventArgs) -> () + 'static) -> Subscription
```

Subscribes to the notifications. Dropping the returned guard
unsubscribes; `Subscription::detach` keeps the subscription for the
life of the event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/interactivity/routed_event.rs#L41)

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

### has_observers

```rust
fn has_observers(self: &Self) -> bool
```

Whether there is any subscriber.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/interactivity/routed_event.rs#L53)

## 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/).
