# MarkupProperty

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

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

```rust
struct MarkupProperty
```

A property that is not a registered property: a plain property with a
getter and/or a setter. Collections are read-only properties whose type
has an `Add` method.

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

## Members

- [`name`](#struct_field-name)
- [`type_`](#struct_field-type_)
- [`get`](#struct_field-get)
- [`set`](#struct_field-set)
- [`attributes`](#struct_field-attributes)
- [`typed_path_element`](#struct_field-typed_path_element)
- [`emit_get`](#struct_field-emit_get)
- [`emit_set`](#struct_field-emit_set)
- [`value_markup`](#struct_field-value_markup)

<a id="struct_field-name"></a>

### name

```rust
name: &'static str
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L557)

<a id="struct_field-type_"></a>

### type_

```rust
type_: TypeOf
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L558)

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

### get

```rust
get: Option<MarkupInvoke>
```

Reads the property: `(instance) -> value`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L560)

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

### set

```rust
set: Option<MarkupInvoke>
```

Writes the property: `(instance, value)`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L562)

<a id="struct_field-attributes"></a>

### attributes

```rust
attributes: &'static [MarkupAttribute]
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L563)

<a id="struct_field-typed_path_element"></a>

### typed_path_element

```rust
typed_path_element: Option<super::typed_path::TypedPathElement>
```

Adds the TYPED element of this property to a compiled binding path
built at run time (what `CompiledBindingPathBuilder::typed_property`
adds in generated code), so that a binding whose path is this single
property is a typed binding expression. Generated by the declaration
forms from the accessors; the hook returns `None` (and the caller
uses the untyped element) unless the instance type of the declaration
is a shared reference type `Rc<S>` (notifying or not). `None` for a static
property, for a property with a fallible setter and for a declaration
whose instance type cannot be such a handle (a class of the object
model, a `struct` or a contract without `this:`). See
`typed_path`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L575)

<a id="struct_field-emit_get"></a>

### emit_get

```rust
emit_get: CompilerMetadata<Option<MarkupEmit>>
```

The typed accessor functions the declaration generated for the
getter and the setter (see `MarkupEmit`); `None` for an accessor
that is not declared.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L579)

<a id="struct_field-emit_set"></a>

### emit_set

```rust
emit_set: CompilerMetadata<Option<MarkupEmit>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L580)

<a id="struct_field-value_markup"></a>

### value_markup

```rust
value_markup: fn() -> Option<&'static MarkupType>
```

The metadata of the value type of the property, when it has metadata
(`MarkupTyped`: `T`, `Option<T>`, `Rc<T>` or `Option<Rc<T>>`). With the tables of
types trimmed (without `type-tables`), registering a type registers the metadata of
the value types of its properties, which a binding through the property finds by
handle. The declaration forms generate it; `|| None` otherwise.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/metadata/markup_type.rs#L586)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`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`
- `Copy`

## Availability

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