# PropValue

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-view/element/enum-propvalue/

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

```rust
enum PropValue
```

The value an element gives a property.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/element.rs#L70)

## Members

- [`Value`](#variant-value)
- [`Dynamic`](#variant-dynamic)
- [`Follows`](#variant-follows)
- [`TwoWay`](#variant-twoway)
- [`Element`](#variant-element)
- [`Binding`](#variant-binding)
- [`TypedElement`](#variant-typedelement)

<a id="variant-value"></a>

### Value

```rust
Value(ferroui_base::BoxedValue)
```

A value, set once. Values compare by value.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/element.rs#L72)

<a id="variant-dynamic"></a>

### Dynamic

```rust
Dynamic(std::rc::Rc<dyn Fn() -> ferroui_base::BoxedValue>)
```

A value computed by a reactive closure: the property is set again
whenever what the closure read changes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/element.rs#L75)

<a id="variant-follows"></a>

### Follows

```rust
Follows { source: u64, compute: std::rc::Rc<dyn Fn() -> ferroui_base::BoxedValue> }
```

A value that follows a signal or a memo: as `Dynamic`, and equal to
another that follows the same source, so that a component that runs
again does not start it again.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/element.rs#L79)

<a id="variant-twoway"></a>

### TwoWay

```rust
TwoWay { get: std::rc::Rc<dyn Fn() -> ferroui_base::BoxedValue>, set: std::rc::Rc<dyn Fn(&dyn Any) -> ()>, source: Option<u64> }
```

A value that goes both ways: the property follows `get`, and a change
of the property is given to `set`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/element.rs#L87)

<a id="variant-element"></a>

### Element

```rust
Element(std::rc::Rc<std::cell::RefCell<Option<Element>>>)
```

An element, mounted with its parent: the property holds its control
(`Content`, `Tag`, a header).

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

<a id="variant-binding"></a>

### Binding

```rust
Binding(std::rc::Rc<dyn BindingBase>)
```

A binding of the property system (`Binding`, a path on the data
context, a compiled binding).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/element.rs#L101)

<a id="variant-typedelement"></a>

### TypedElement

```rust
TypedElement { element: std::rc::Rc<std::cell::RefCell<Option<Element>>>, wrap: fn(Option<ferroui_base::Ref<ferroui_controls::Control>>) -> ferroui_base::BoxedValue }
```

An element, mounted with its parent, for a property that holds a
control of a class (`context_menu`): `wrap` makes the value of the
property from the control.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/element.rs#L105)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`IntoValue<T>`](/docs/0.5.0/api/ferroui-view/builder/trait-intovalue/)
- [`IntoValue<Option<T>>`](/docs/0.5.0/api/ferroui-view/builder/trait-intovalue/)
- [`FromValue<T>`](/docs/0.5.0/api/ferroui-view/builder/trait-fromvalue/)
- [`FromValue<Option<T>>`](/docs/0.5.0/api/ferroui-view/builder/trait-fromvalue/)
- [`IntoProp<T, Value>`](/docs/0.5.0/api/ferroui-view/builder/trait-intoprop/)
- [`AnyValueEq`](/docs/0.5.0/api/ferroui-view/element/trait-anyvalueeq/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`TreeModel`](/docs/0.5.0/api/ferroui-treedatagrid-core/accessor/trait-treemodel/)
- `Clone`
- `PartialEq`
- `Debug`

## Availability

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