# CombineLatestSink

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

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

```rust
struct CombineLatestSink
```

The latest values of two sources, combined (`CombineLatestSink<TFirst, TSecond>`): once both
have produced a value, `on_next` receives the latest pair at each change; an error of either
goes to `on_error`, and their ends are ignored.

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

## Members

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

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

### new

```rust
fn new<A: Clone + 'static, B: Clone + 'static>(first: Rc<dyn IObservable<A>>, second: Rc<dyn IObservable<B>>, on_next: impl Fn(A, B) -> () + 'static, on_error: Option<Rc<dyn Fn(ObservableError) -> ()>>) -> Self
```

Subscribes `first` and `second` (`CombineLatestSink(IObservable<TFirst>, IObservable<TSecond>,
Action<TFirst, TSecond>, Action<Exception>?)`).

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

## Trait implementations

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

## Availability

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