# Binding

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-markup/data/struct-binding/

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

```rust
struct Binding
```

A binding with a string path, resolved at run time. This is the binding
that markup creates when bindings are not compiled.

The class derives from `ReflectionBinding`, whose properties it has.
Like it, a binding is a mutable reference object shared as `Rc<Binding>`,
which converts to `Rc<dyn BindingBase>`; handles compare by identity.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L20)

## Members

- [`new`](#function-new)
- [`with_path`](#function-with_path)
- [`with_path_and_mode`](#function-with_path_and_mode)
- [`with_converter`](#function-with_converter)
- [`with_converter_value`](#function-with_converter_value)
- [`with_converter_culture`](#function-with_converter_culture)
- [`with_converter_parameter`](#function-with_converter_parameter)
- [`with_delay`](#function-with_delay)
- [`with_element_name`](#function-with_element_name)
- [`with_fallback_value`](#function-with_fallback_value)
- [`with_mode`](#function-with_mode)
- [`with_priority`](#function-with_priority)
- [`with_relative_source`](#function-with_relative_source)
- [`with_source`](#function-with_source)
- [`with_string_format`](#function-with_string_format)
- [`with_target_null_value`](#function-with_target_null_value)
- [`with_update_source_trigger`](#function-with_update_source_trigger)
- [`with_type_resolver`](#function-with_type_resolver)
- [`with_default_anchor`](#function-with_default_anchor)
- [`with_name_scope`](#function-with_name_scope)

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

### new

```rust
fn new() -> Rc<Self>
```

Creates a binding without a path: binds to the source itself.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L35)

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

### with_path

```rust
fn with_path(path: &str) -> Rc<Self>
```

Creates a binding with the given path.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L40)

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

### with_path_and_mode

```rust
fn with_path_and_mode(path: &str, mode: BindingMode) -> Rc<Self>
```

Creates a binding with the given path and mode.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L45)

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

### with_converter

```rust
fn with_converter(self: Rc<Self>, converter: Rc<dyn IValueConverter>) -> Rc<Self>
```

The chaining form of `set_converter`, for a converter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L50)

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

### with_converter_value

```rust
fn with_converter_value(self: Rc<Self>, value: Option<Rc<dyn IValueConverter>>) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_converter_culture

```rust
fn with_converter_culture(self: Rc<Self>, value: Option<CultureInfo>) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_converter_parameter

```rust
fn with_converter_parameter(self: Rc<Self>, value: Option<BoxedValue>) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_delay

```rust
fn with_delay(self: Rc<Self>, value: i32) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_element_name

```rust
fn with_element_name(self: Rc<Self>, value: Option<String>) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_fallback_value

```rust
fn with_fallback_value(self: Rc<Self>, value: Option<BoxedValue>) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_mode

```rust
fn with_mode(self: Rc<Self>, value: BindingMode) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_priority

```rust
fn with_priority(self: Rc<Self>, value: BindingPriority) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_relative_source

```rust
fn with_relative_source(self: Rc<Self>, value: Option<Rc<RelativeSource>>) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_source

```rust
fn with_source(self: Rc<Self>, value: Option<BoxedValue>) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_string_format

```rust
fn with_string_format(self: Rc<Self>, value: Option<String>) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_target_null_value

```rust
fn with_target_null_value(self: Rc<Self>, value: Option<BoxedValue>) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_update_source_trigger

```rust
fn with_update_source_trigger(self: Rc<Self>, value: UpdateSourceTrigger) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_type_resolver

```rust
fn with_type_resolver(self: Rc<Self>, value: Option<TypeResolver>) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_default_anchor

```rust
fn with_default_anchor(self: Rc<Self>, value: Option<WeakRef<FerroObject>>) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

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

### with_name_scope

```rust
fn with_name_scope(self: Rc<Self>, value: Option<Weak<dyn INameScope>>) -> Rc<Self>
```

The chaining form of the setter.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Markup/FerroUI.Markup/data/binding.rs#L71)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Default`
- `PartialEq`
- `Deref`
- [`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/).
