# SettableProperty

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

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

```rust
struct SettableProperty<S, V>
```

A property a binding reads, observes and writes: its `PropertyPath` (the getter, the names
and the observation of its steps) and a setter that writes the value at the end of the path.

`settable_prop!` writes one from the getters, with the setter
`set_<last getter>` of the object that owns the last property (`x => x.Address.Street` sets
with `x.address().set_street(value)`). `new` takes any setter, for a path whose
owner may be absent or a setter of another name.

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

## Members

- [`new`](#function-new)
- [`path`](#function-path)
- [`get`](#function-get)
- [`set`](#function-set)
- [`setter`](#function-setter)

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

### new

```rust
fn new(path: PropertyPath<S, V>, set: impl Fn(&S, V) -> () + 'static) -> Self
```

The property at the end of `path`, written by `set`.

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

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

### path

```rust
fn path(self: &Self) -> &PropertyPath<S, V>
```

The path of the property.

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

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

### get

```rust
fn get(self: &Self, source: &S) -> V
```

The value of the property on `source`.

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

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

### set

```rust
fn set(self: &Self, source: &S, value: V)
```

Writes `value` to the property on `source`.

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

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

### setter

```rust
fn setter(self: &Self) -> Rc<dyn Fn(&S, V) -> ()>
```

The setter of the property.

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

## Trait implementations

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

## Availability

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