# CompiledBindingPathBuilder

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/data/struct-compiledbindingpathbuilder/

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

```rust
struct CompiledBindingPathBuilder
```

Builds a [`CompiledBindingPath`](/docs/0.5.0/api/ferroui-base/data/struct-compiledbindingpath/).

The builder is a reference object: a shared handle to the elements
collected so far. Every method adds an element and returns the builder
(another handle to it), so that calls can be chained, as well as made one
by one through any clone of the handle. Handles compare by identity.

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

## Members

- [`new`](#function-new)
- [`not`](#function-not)
- [`ferro_property`](#function-ferro_property)
- [`ferro_property_with`](#function-ferro_property_with)
- [`property`](#function-property)
- [`property_with`](#function-property_with)
- [`typed_property`](#function-typed_property)
- [`notifying_property`](#function-notifying_property)
- [`notifying_read_only_property`](#function-notifying_read_only_property)
- [`command`](#function-command)
- [`notifying_command`](#function-notifying_command)
- [`stream_task`](#function-stream_task)
- [`stream_observable`](#function-stream_observable)
- [`stream`](#function-stream)
- [`self_`](#function-self_)
- [`ancestor`](#function-ancestor)
- [`visual_ancestor`](#function-visual_ancestor)
- [`element_name`](#function-element_name)
- [`indexer_property`](#function-indexer_property)
- [`list_item`](#function-list_item)
- [`dictionary_item`](#function-dictionary_item)
- [`array_element`](#function-array_element)
- [`type_cast`](#function-type_cast)
- [`function`](#function-function)
- [`bind_back`](#function-bind_back)
- [`event_handler`](#function-event_handler)
- [`templated_parent`](#function-templated_parent)
- [`property_untyped`](#function-property_untyped)
- [`property_untyped_with`](#function-property_untyped_with)
- [`command_untyped`](#function-command_untyped)
- [`method_untyped`](#function-method_untyped)
- [`typed_plain_property_info_with`](#function-typed_plain_property_info_with)
- [`build`](#function-build)
- [`typed_property_info`](#function-typed_property_info)
- [`typed_property_info_with`](#function-typed_property_info_with)

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

### new

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



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

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

### not

```rust
fn not(self: &Self) -> Self
```

Negates the result of the path.

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

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

### ferro_property

```rust
fn ferro_property(self: &Self, property: &'static FerroProperty) -> Self
```

A registered property of an object of the class hierarchy.

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

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

### ferro_property_with

```rust
fn ferro_property_with(self: &Self, property: &'static FerroProperty, accepts_null: bool) -> Self
```

A registered property of an object of the class hierarchy.
`accepts_null` applies a null-conditional operator to the access: a
null owner produces null instead of an error.

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

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

### property

```rust
fn property(self: &Self, info: Rc<dyn IPropertyInfo>, accessor_factory: PropertyAccessorFactory) -> Self
```

A plain property, from its description and the factory of its
accessor.

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

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

### property_with

```rust
fn property_with(self: &Self, info: Rc<dyn IPropertyInfo>, accessor_factory: PropertyAccessorFactory, accepts_null: bool) -> Self
```

A plain property. `accepts_null` applies a null-conditional operator
to the access: a null owner produces null instead of an error.

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

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

### typed_property

```rust
fn typed_property<S: INotifyPropertyChanged + PartialEq + 'static, V: PropertyValue>(self: &Self, name: &str, get: impl Fn(&S) -> V + 'static, set: Option<Rc<dyn Fn(&S, V) -> ()>>) -> Self
```

A property with typed accessors on a model type that raises property
change notifications. A binding whose path is this single element,
bound to a target property of exactly type `V`, reads and writes
values without boxing them.

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

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

### notifying_property

```rust
fn notifying_property<O: INotifyPropertyChanged + PartialEq + 'static, K: PropertyKind>(self: &Self, name: &str, get: impl Fn(&O) -> <K as >::Typed + 'static, set: impl Fn(&O, <K as >::Typed) -> () + 'static) -> Self
```

A read-write property of a model type that raises property change
notifications, from typed accessors.

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

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

### notifying_read_only_property

```rust
fn notifying_read_only_property<O: INotifyPropertyChanged + PartialEq + 'static, K: PropertyKind>(self: &Self, name: &str, get: impl Fn(&O) -> <K as >::Typed + 'static) -> Self
```

A read-only property of a model type that raises property change
notifications, from a typed getter.

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

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

### command

```rust
fn command<O: 'static>(self: &Self, method_name: &str, execute: impl Fn(&O, Option<&BoxedValue>) -> () + 'static, can_execute: Option<Rc<dyn Fn(&O, Option<&BoxedValue>) -> bool>>, depends_on_properties: &[&str]) -> Self
```

A method used as a command.

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

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

### notifying_command

```rust
fn notifying_command<O: INotifyPropertyChanged + 'static>(self: &Self, method_name: &str, execute: impl Fn(&O, Option<&BoxedValue>) -> () + 'static, can_execute: Option<Rc<dyn Fn(&O, Option<&BoxedValue>) -> bool>>, depends_on_properties: &[&str]) -> Self
```

A method used as a command on an owner that raises property change
notifications: the command's state is re-queried when one of
`depends_on_properties` changes.

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

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

### stream_task

```rust
fn stream_task(self: &Self) -> Self
```

Streams the outcome of a task (`^`).

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

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

### stream_observable

```rust
fn stream_observable(self: &Self) -> Self
```

Streams the values of an observable (`^`).

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

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

### stream

```rust
fn stream(self: &Self, plugin: Rc<dyn IStreamPlugin>) -> Self
```

Streams values through a custom stream plugin.

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

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

### self_

```rust
fn self_(self: &Self) -> Self
```

Roots the path at the binding target itself (`$self`).

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

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

### ancestor

```rust
fn ancestor(self: &Self, ancestor_type: Option<&'static TypeInfo>, level: usize) -> Self
```

Roots the path at an ancestor in the logical tree.

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

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

### visual_ancestor

```rust
fn visual_ancestor(self: &Self, ancestor_type: Option<&'static TypeInfo>, level: usize) -> Self
```

Roots the path at an ancestor in the visual tree.

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

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

### element_name

```rust
fn element_name(self: &Self, name_scope: NameScopeRef, name: &str) -> Self
```

Roots the path at a named element.

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

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

### indexer_property

```rust
fn indexer_property<O: 'static, K: PropertyKind>(self: &Self, index: i32, get: impl Fn(&O, i32) -> Result<<K as >::Typed, BindingError> + 'static, set: Option<Rc<dyn Fn(&O, i32, <K as >::Typed) -> Result<(), BindingError>>>) -> Self
```

An indexer with one integer argument (`owner[index]`) on owner type
`O`, from typed accessors that fail for a bad index. The value is
re-read when the owner raises a collection change that affects
`index`, or a property change for the indexer.

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

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

### list_item

```rust
fn list_item<T: PropertyValue>(self: &Self, index: i32) -> Self
```

The item at `index` of a `BindableList` (`list[index]`).

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

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

### dictionary_item

```rust
fn dictionary_item<K: Eq + Hash + Clone + fmt::Display + 'static, V: PropertyValue>(self: &Self, key: K) -> Self
```

The entry for `key` of a `BindableDictionary` (`dictionary[key]`).
Reading a missing key is an error; writing adds the entry.

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

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

### array_element

```rust
fn array_element(self: &Self, indices: &[i32]) -> Self
```

Indexes an array with integer indexes, one per dimension.

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

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

### type_cast

```rust
fn type_cast<T: ObjectType>(self: &Self) -> Self
```

Casts to class `T`: passes an object on if it is a `T`, else null.

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

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

### function

```rust
fn function(self: &Self, name: &str, arguments: Vec<PathFunctionArgument>, invoke: PathFunctionInvoke, notifier: Option<AsNotifyPropertyChanged>) -> Self
```

A function call, the last element of the path (the function step of WinUI's compiled
bindings: `{x:Bind Format(Name, 'text')}`, `{x:Bind Model.Format(Name)}`,
`{x:Bind local:Helpers.Format(Name)}`). The elements before it give the owner of an
instance function; a function at the start of the path is called on the root source.
`invoke` calls it with the owner and the values of `arguments`, each a path read from
the root source of the expression or a constant.

Unless the binding is `OneTime`, the function is called again when the owner changes,
when the value of an argument path changes, and, with a `notifier` that views the owner
as a source of property change notifications, when the owner reports a change of a
property named as the function (or of all its properties). An argument path that cannot
be read (a null in its chain) is an error of the binding: the function is not called.

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

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

### bind_back

```rust
fn bind_back(self: &Self, owner: Option<CompiledBindingPath>, value_type: ValueType, invoke: PathBindBackInvoke) -> Self
```

The `BindBack` of the function the path ends with: a `TwoWay` binding writes the value
of its target by calling `invoke` with the owner (the value of `owner` read from the
root source, or the root source itself) and the value, converted to `value_type`.
## Panics
Panics if the last element of the path is not a `function`.

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

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

### event_handler

```rust
fn event_handler(self: &Self, name: &str, invoke: PathEventHandlerInvoke) -> Self
```

The method an event binding of `{x:Bind}` calls, the last element of the path
(`Click="{x:Bind OnClick}"`, `{x:Bind Model.OnClick}`, `{x:Bind local:Handlers.OnClick}`):
when the event is raised, `invoke` is called with the value of the elements before it
read from the root source (the root source itself for a method at the start of the path)
and the arguments of the event. An expression does not read the element.

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

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

### templated_parent

```rust
fn templated_parent(self: &Self) -> Self
```

Roots the path at the templated parent of the binding target.

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

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

### property_untyped

```rust
fn property_untyped(self: &Self, name: &str, property_type: ValueType, get: UntypedGetter, set: Option<UntypedSetter>, notifier: Option<AsNotifyPropertyChanged>) -> Self
```

A property whose accessors are closures over untyped values: `get`
reads it from the handle of its owner, `set` (if the property can be
written) writes it, and `notifier` (if the owner raises property
change notifications) views the owner as a notifier. `property_type`
is the type of the property's value.

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

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

### property_untyped_with

```rust
fn property_untyped_with(self: &Self, name: &str, property_type: ValueType, get: UntypedGetter, set: Option<UntypedSetter>, notifier: Option<AsNotifyPropertyChanged>, accepts_null: bool) -> Self
```

As `property_untyped`. `accepts_null`
applies a null-conditional operator to the access: a null owner
produces null instead of an error.

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

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

### command_untyped

```rust
fn command_untyped(self: &Self, method_name: &str, execute: UntypedExecute, can_execute: Option<UntypedCanExecute>, depends_on_properties: &[&str], notifier: Option<AsNotifyPropertyChanged>) -> Self
```

A method used as a command, from closures over the handle of the
owner. The command's state is re-queried when the owner (viewed as a
notifier by `notifier`) reports a change of one of
`depends_on_properties`.

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

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

### method_untyped

```rust
fn method_untyped(self: &Self, name: &str, create_delegate: UntypedCreateDelegate, accepts_null: bool) -> Self
```

A method as a delegate value: the path element produces the value
`create_delegate` makes for the handle of the owner, usually an
untyped callback (`MarkupDelegate`)
that invokes the method on it. `accepts_null` applies a
null-conditional operator to the access: a null owner produces null
instead of an error.

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

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

### typed_plain_property_info_with

```rust
fn typed_plain_property_info_with<S: PartialEq + 'static, V: PropertyValue>(self: &Self, info: TypedClrPropertyInfo<S, V>, accepts_null: bool) -> Self
```

A property with typed accessors on a shared model type that raises
NO property change notifications: as
`typed_property_info_with`, with
the value read once per source (the typed property overload of the
managed original does not require a notifying source).

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

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

### build

```rust
fn build(self: &Self) -> CompiledBindingPath
```

The path of the elements added so far.

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

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

### typed_property_info

```rust
fn typed_property_info<S: INotifyPropertyChanged + PartialEq + 'static, V: PropertyValue>(self: &Self, info: TypedClrPropertyInfo<S, V>) -> Self
```

As `typed_property`, from a property
description (which may have a fallible getter).

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

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

### typed_property_info_with

```rust
fn typed_property_info_with<S: INotifyPropertyChanged + PartialEq + 'static, V: PropertyValue>(self: &Self, info: TypedClrPropertyInfo<S, V>, accepts_null: bool) -> Self
```

As `typed_property_info`. `accepts_null`
applies a null-conditional operator to the access (the three
argument `Property<TSource, TValue>` of the managed original).

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Default`
- `PartialEq`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)
- [`ValueTypeRegistration`](/docs/0.5.0/api/ferroui-base/data/core/trait-valuetyperegistration/)

## Availability

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