# ReactiveViewFor

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui-controls/struct-reactiveviewfor/

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

```rust
struct ReactiveViewFor<C: IReactiveViewClass>
```

A control with a `ViewModel` property as an untyped view of ReactiveUI (`IViewFor`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/reactive_view.rs#L53)

## Members

- [`new`](#function-new)
- [`weak`](#function-weak)
- [`control`](#function-control)
- [`into_view_for`](#function-into_view_for)

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

### new

```rust
fn new(control: Ref<C>) -> Rc<Self>
```

The view of `control`, which it keeps alive.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/reactive_view.rs#L59)

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

### weak

```rust
fn weak(control: &Ref<C>) -> Rc<Self>
```

The view of `control`, which it does not keep alive (the view a control activates itself
with).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/reactive_view.rs#L65)

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

### control

```rust
fn control(self: &Self) -> Option<Ref<C>>
```

The control, while it is alive.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/reactive_view.rs#L75)

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

### into_view_for

```rust
fn into_view_for(self: Rc<Self>) -> Rc<dyn IViewFor>
```

The view as `IViewFor`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/reactive_view.rs#L80)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`IntoViewFor`](/docs/0.5.0/api/ferroui-reactiveui/binding/interfaces/trait-intoviewfor/)
- [`IViewControl`](/docs/0.5.0/api/ferroui-reactiveui-controls/trait-iviewcontrol/)
- [`IActivatableView`](/docs/0.5.0/api/ferroui-reactiveui/binding/interfaces/trait-iactivatableview/)
- [`IViewFor`](/docs/0.5.0/api/ferroui-reactiveui/binding/interfaces/trait-iviewfor/)

## Availability

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