# ViewThreadObservable

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/binding/observables/struct-viewthreadobservable/

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

```rust
struct ViewThreadObservable<T: 'static>
```

Delivers each notification on the thread that owns the object a binding writes to, or on a
scheduler (`ViewThreadObservable<T>`).

A notification raised on the owning thread, while nothing waits, is delivered at once. Otherwise
it waits for the owning thread, and both forms deliver only the latest value that waits: a
two-way binding that names a scheduler writes each side once with the newest value, rather than
replaying every value the other side raised in between. A delivery on a scheduler never runs at
once.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/observables/view_thread_observable.rs#L30)

## Members

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

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

### new

```rust
fn new(source: Rc<dyn IObservable<T>>, target: Rc<dyn Any>, invoker: Rc<dyn IViewThreadInvoker>) -> Self
```

The stage that delivers on the thread that owns `target`, through `invoker`
(`ViewThreadObservable(IObservable<T>, object, IViewThreadInvoker)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/observables/view_thread_observable.rs#L38)

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

### on_sequencer

```rust
fn on_sequencer(source: Rc<dyn IObservable<T>>, sequencer: Rc<dyn IScheduler>) -> Self
```

The stage that delivers on `sequencer` (`ViewThreadObservable(IObservable<T>, ISequencer)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/observables/view_thread_observable.rs#L43)

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