# FerroPropertyAccessor

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

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

```rust
struct FerroPropertyAccessor
```

The accessor of a registered property of an object of the class
hierarchy: reads and writes the property and follows its changes.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/core/plugins/ferro_property_accessor_plugin.rs#L80)

## Members

- [`new`](#function-new)
- [`instance`](#function-instance)

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

### new

```rust
fn new(reference: Option<WeakRef<FerroObject>>, property: &'static FerroProperty) -> Rc<dyn IPropertyAccessor>
```

Creates an accessor for `property` of the object behind
`reference`. `None` is a reference without a target (the weak
reference to null of the managed original): such an accessor has no
value.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/core/plugins/ferro_property_accessor_plugin.rs#L93)

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

### instance

```rust
fn instance(self: &Self) -> Option<Ref<FerroObject>>
```

The object the accessor reads from, if it is still alive.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/data/core/plugins/ferro_property_accessor_plugin.rs#L104)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ErasedDestructor`
- `IntoEither`
- [`IDisposable`](/docs/0.5.0/api/ferroui-base/reactive/use-idisposable/)
- [`IPropertyAccessor`](/docs/0.5.0/api/ferroui-base/data/core/plugins/trait-ipropertyaccessor/)
- `Drop`

## Availability

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