# DirectPropertyBase

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

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

```rust
struct DirectPropertyBase<T: PropertyValue>
```

Base class for direct properties.

Holds everything about a direct property that does not depend on the type
of its owner.

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

## Members

- [`as_property`](#function-as_property)
- [`owner`](#function-owner)
- [`get_unset_value`](#function-get_unset_value)
- [`get_unset_value_for`](#function-get_unset_value_for)
- [`get_metadata`](#function-get_metadata)
- [`get_metadata_for`](#function-get_metadata_for)
- [`override_metadata`](#function-override_metadata)
- [`override_metadata_for`](#function-override_metadata_for)
- [`unregister`](#function-unregister)

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

### as_property

```rust
fn as_property(self: &'static Self) -> &'static FerroProperty
```

The untyped base of the property.

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

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

### owner

```rust
fn owner(self: &Self) -> &'static TypeInfo
```

The class that registered this instance of the property.

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

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

### get_unset_value

```rust
fn get_unset_value(self: &Self, type_: &'static TypeInfo) -> T
```

Gets the unset value for the property on the specified type.

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

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

### get_unset_value_for

```rust
fn get_unset_value_for(self: &Self, owner: &FerroObject) -> T
```

Gets the unset value for the property on the type of `owner`.

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

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

### get_metadata

```rust
fn get_metadata(self: &Self, type_: &'static TypeInfo) -> Rc<DirectPropertyMetadata<T>>
```

Gets the property metadata for the specified type.

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

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

### get_metadata_for

```rust
fn get_metadata_for(self: &Self, owner: &FerroObject) -> Rc<DirectPropertyMetadata<T>>
```

Gets the property metadata for the type of `owner`.

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

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

### override_metadata

```rust
fn override_metadata<TOwner: ObjectType>(self: &Self, metadata: DirectPropertyMetadata<T>)
```

Overrides the metadata for the property on class `TOwner`.

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

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

### override_metadata_for

```rust
fn override_metadata_for(self: &Self, type_: &'static TypeInfo, metadata: DirectPropertyMetadata<T>)
```

Overrides the metadata for the property on the specified type.

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

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

### unregister

```rust
fn unregister(self: &Self, type_: &'static TypeInfo)
```

Removes the metadata registered for the specified type.

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

## 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>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`TypedProperty`](/docs/0.5.0/api/ferroui-base/trait-typedproperty/)

## Availability

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