# BindingErrors

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

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

```rust
struct BindingErrors
```

How a binding reacts when the sequence feeding its write faults (`BindingErrors`).

A faulted write has no caller stack to surface on: it arrives wherever the change notification
was raised. Every fault is logged against the bound expression. A fault that carries an inner
error (its `source`), a setter that failed, becomes a
[`TargetInvocationError`](/docs/0.5.0/api/ferroui-reactiveui/binding/bindings/struct-targetinvocationerror/) where upstream throws it, and goes where that exception would end:
the `ThrownExceptions` of the reactive object whose change notification is running, or else
`RxState::default_exception_handler`, which an application replaces
(`RxState::initialize_exception_handler`) and which by default raises it on the main thread.
No panic is raised here (#567), so the binding behaves the same with `panic = "abort"`. A fault with none is the sequence itself ending in
error, and is only logged. Completion is ignored.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/binding_errors.rs#L21)

## Members

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

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

### subscribe

```rust
fn subscribe<T: 'static>(source: Rc<dyn IObservable<T>>, on_next: impl Fn(T) -> () + 'static, binding_expression: impl Into<String>) -> Rc<dyn IDisposable>
```

Subscribes the write `on_next` of a binding to `source`, applying the fault contract;
`binding_expression` names the bound expression in the log entry and the raised error
(`Subscribe<T>(IObservable<T>, Action<T>, string)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/binding_errors.rs#L27)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`

## Availability

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