# FromEventObservable

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/platform/struct-fromeventobservable/

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

```rust
struct FromEventObservable<T>
```

A bridge from an event to an observable (`FromEventObservable<T>`), with no reflection, no
scheduler and no queue: each subscription calls `subscribe` with the function that pushes a
value to the observer, and `subscribe` hooks it to the event and returns what unhooks it.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/platform/from_event_observable.rs#L12)

## Members

- [`new`](#function-new)

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

### new

```rust
fn new(subscribe: impl Fn(EventSink<T>) -> Rc<dyn IDisposable> + 'static) -> Rc<Self>
```

A bridge that hooks the event with `subscribe` (`FromEventObservable(Func<Action<T>, IDisposable>)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/platform/from_event_observable.rs#L18)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`SubscribeGuard<T>`](/docs/0.5.0/api/ferroui-base/reactive/use-subscribeguard/)
- [`IObservable<T>`](/docs/0.5.0/api/ferroui-base/reactive/use-iobservable/)

## Availability

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