# FerroObjectExtensions

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

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

```rust
trait FerroObjectExtensions
```

Extension members for [`FerroObject`](/docs/0.5.0/api/ferroui-base/struct-ferroobject/).

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

## Members

- [`get_observable`](#function-get_observable)
- [`get_observable_with`](#function-get_observable_with)
- [`get_observable_untyped`](#function-get_observable_untyped)
- [`get_observable_untyped_with`](#function-get_observable_untyped_with)
- [`get_binding_observable`](#function-get_binding_observable)
- [`get_binding_observable_with`](#function-get_binding_observable_with)
- [`get_binding_observable_untyped`](#function-get_binding_observable_untyped)
- [`get_binding_observable_untyped_with`](#function-get_binding_observable_untyped_with)
- [`get_property_changed_observable`](#function-get_property_changed_observable)
- [`bind_typed`](#function-bind_typed)
- [`bind_typed_value`](#function-bind_typed_value)
- [`get_typed_value`](#function-get_typed_value)
- [`get_typed_base_value`](#function-get_typed_base_value)
- [`get_base_value_untyped`](#function-get_base_value_untyped)

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

### get_observable

```rust
fn get_observable<P: TypedProperty>(self: &Self, property: &'static P) -> Rc<dyn IObservable<<P as >::Value>>
```

Gets an observable for a property.

The observable fires with the current value of the property on the
object immediately upon subscription, and then every time the value
changes. It holds a weak reference to the object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L219)

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

### get_observable_with

```rust
fn get_observable_with<P: TypedProperty, TResult: PropertyValue>(self: &Self, property: &'static P, converter: impl Fn(<P as >::Value) -> TResult + 'static) -> Rc<dyn IObservable<TResult>>
```

Gets an observable for a property, projecting each value with
`converter`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L223)

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

### get_observable_untyped

```rust
fn get_observable_untyped(self: &Self, property: &'static FerroProperty) -> Rc<dyn IObservable<BoxedValue>>
```

Gets an observable of untyped values for a property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L230)

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

### get_observable_untyped_with

```rust
fn get_observable_untyped_with<TResult: PropertyValue>(self: &Self, property: &'static FerroProperty, converter: impl Fn(BoxedValue) -> TResult + 'static) -> Rc<dyn IObservable<TResult>>
```

Gets an observable of untyped values for a property, projecting each
value with `converter`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L234)

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

### get_binding_observable

```rust
fn get_binding_observable<P: TypedProperty>(self: &Self, property: &'static P) -> Rc<dyn IObservable<BindingValue<<P as >::Value>>>
```

Gets an observable of binding values for a property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L241)

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

### get_binding_observable_with

```rust
fn get_binding_observable_with<P: TypedProperty, TResult: PropertyValue>(self: &Self, property: &'static P, converter: impl Fn(<P as >::Value) -> TResult + 'static) -> Rc<dyn IObservable<BindingValue<TResult>>>
```

Gets an observable of binding values for a property, projecting each
value with `converter`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L248)

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

### get_binding_observable_untyped

```rust
fn get_binding_observable_untyped(self: &Self, property: &'static FerroProperty) -> Rc<dyn IObservable<BindingValue<BoxedValue>>>
```

Gets an observable of untyped binding values for a property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L255)

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

### get_binding_observable_untyped_with

```rust
fn get_binding_observable_untyped_with<TResult: PropertyValue>(self: &Self, property: &'static FerroProperty, converter: impl Fn(BoxedValue) -> TResult + 'static) -> Rc<dyn IObservable<BindingValue<TResult>>>
```

Gets an observable of untyped binding values for a property,
projecting each value with `converter`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L262)

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

### get_property_changed_observable

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

Gets an observable that listens for property changed events of a
property on this object. It fires each time the property changes and
does not fire with the current value on subscription.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L271)

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

### bind_typed

```rust
fn bind_typed<P: TypedProperty>(self: &Self, property: &'static P, source: Rc<dyn IObservable<<P as >::Value>>, priority: BindingPriority) -> Rc<dyn IDisposable>
```

Binds a typed property of any kind to an observable. The priority is
ignored for direct properties.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L275)

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

### bind_typed_value

```rust
fn bind_typed_value<P: TypedProperty>(self: &Self, property: &'static P, source: Rc<dyn IObservable<BindingValue<<P as >::Value>>>, priority: BindingPriority) -> Rc<dyn IDisposable>
```

Binds a typed property of any kind to an observable of binding values.
The priority is ignored for direct properties.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L284)

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

### get_typed_value

```rust
fn get_typed_value<P: TypedProperty>(self: &Self, property: &'static P) -> <P as >::Value
```

Gets the value of a typed property of any kind.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L292)

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

### get_typed_base_value

```rust
fn get_typed_base_value<P: TypedProperty>(self: &Self, property: &'static P) -> Option<<P as >::Value>
```

Gets the base value of a typed property of any kind: the value
excluding animated values. For direct properties this is the value.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L296)

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

### get_base_value_untyped

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

Gets the base value of a property as an untyped value; the unset
marker when there is none.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/ferro_object_extensions.rs#L300)

## Trait implementations

- [`FerroObjectExtensions`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectextensions/)

## Availability

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