# ViewHostResolution

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/platform/struct-viewhostresolution/

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

```rust
struct ViewHostResolution
```

The view lookup that the view hosts of the platforms share (`ViewHostResolution`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/platform/view_host_resolution.rs#L11)

## Members

- [`resolve_view_without_reflection`](#function-resolve_view_without_reflection)
- [`resolve_view_with_fallback`](#function-resolve_view_with_fallback)
- [`resolve_attached_view`](#function-resolve_attached_view)
- [`no_view_found_warning`](#function-no_view_found_warning)

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

### resolve_view_without_reflection

```rust
fn resolve_view_without_reflection(view_locator: &Rc<dyn IViewLocator>, view_model: Rc<dyn Any>, contract: Option<&str>) -> Option<Rc<dyn IViewFor>>
```

The view of `view_model` under `contract`, found by the run-time type of the view model
without building any type at run time (`ResolveViewWithoutReflection`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/platform/view_host_resolution.rs#L16)

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

### resolve_view_with_fallback

```rust
fn resolve_view_with_fallback(resolve_view: &ResolveView, view_locator: Option<Rc<dyn IViewLocator>>, view_model: Rc<dyn Any>, contract: Option<&str>, contract_fallback_by_pass: bool) -> Option<Rc<dyn IViewFor>>
```

The view of `view_model` under `contract`, then under the default contract unless
`contract_fallback_by_pass` (`ResolveViewWithFallback`); `view_locator` is the host's
locator, or the current one when it is `None`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/platform/view_host_resolution.rs#L27)

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

### resolve_attached_view

```rust
fn resolve_attached_view(resolve_view: &ResolveView, view_locator: Option<Rc<dyn IViewLocator>>, view_model: Option<Rc<dyn Any>>, contract: Option<&str>, contract_fallback_by_pass: bool) -> Option<Rc<dyn IViewFor>>
```

The view of `view_model`, with the view model set on it (`ResolveAttachedView`); `None`
when there is no view model or no view.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/platform/view_host_resolution.rs#L44)

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

### no_view_found_warning

```rust
fn no_view_found_warning(host_name: &str, view_model_type: &str, view_model: &dyn std::fmt::Debug, unsafe_host_name: &str) -> String
```

The warning a host logs when it finds no view for a view model (`NoViewFoundWarning`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/platform/view_host_resolution.rs#L60)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`

## Availability

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