# BindingBase

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/data/trait-bindingbase/

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

```rust
trait BindingBase
```

The base of bindings: a description from which binding expressions are
instantiated on targets.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/binding_base.rs#L7)

## Members

- [`create_instance`](#function-create_instance)
- [`as_any`](#function-as_any)

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

### create_instance

```rust
fn create_instance(self: &Self, target: &FerroObject, target_property: Option<&'static FerroProperty>, anchor: Option<&Ref<FerroObject>>) -> Rc<dyn BindingExpressionBase>
```

Creates a binding expression from the binding.

`anchor` provides, if `target` is not an element, an object from which
to locate a data context or other elements.

This is a low-level method which returns a binding expression that is
not yet connected to a binding sink, and so is inactive.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/binding_base.rs#L15)

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

### as_any

```rust
fn as_any(self: &Self) -> Option<&dyn std::any::Any>
```

The implementing value, for casting to its concrete type
(`as_any()?.downcast_ref::<T>()`): the equivalent of `is`/`as` on the
contract. `None` for an implementation that does not expose itself.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/binding_base.rs#L25)

## Trait implementations

- [`BindingBase`](/docs/0.5.0/api/ferroui-base/data/trait-bindingbase/)

## Availability

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