# ViewContractObservableHelpers

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

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

```rust
struct ViewContractObservableHelpers
```

The streams of the view contract that the view hosts of the platforms share
(`ViewContractObservableHelpers`).

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

## Members

- [`get_platform_orientation`](#function-get_platform_orientation)
- [`create`](#function-create)

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

### get_platform_orientation

```rust
fn get_platform_orientation(logger: &dyn IFullLogger) -> Rc<dyn Fn() -> Option<String>>
```

The function that gives the orientation of the platform to a view host
(`GetPlatformOrientation(IFullLogger)`): that of the registered `IPlatformOperations`,
or, with none registered, a function that gives `None` after `logger` reported the missing
registration.

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

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

### create

```rust
fn create(platform_getter: &dyn Fn() -> Option<String>, size_changes: Rc<dyn IObservable<Option<String>>>) -> Rc<dyn IObservable<Option<String>>>
```

The stream of the view contract from the orientation of the platform and the changes of
the size of the host (`Create(Func<string?>, IObservable<string?>)`): the current
orientation, then the orientation after each change of size, without repeats. In a unit
test runner it never notifies.

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

## 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/).
