# HeadlessVncPlatformExtensions

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-headless-vnc/trait-headlessvncplatformextensions/

**trait** · [`ferroui-headless-vnc`](/docs/0.5.0/api/ferroui-headless-vnc/) · v0.5.0

```rust
trait HeadlessVncPlatformExtensions
```

The extensions of the application builder that start an application on
the headless platform with a VNC server.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/headless_vnc_platform_extensions.rs#L30)

## Members

- [`start_with_headless_vnc_platform`](#function-start_with_headless_vnc_platform)
- [`start_with_headless_vnc_platform_with_password`](#function-start_with_headless_vnc_platform_with_password)

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

### start_with_headless_vnc_platform

```rust
fn start_with_headless_vnc_platform(self: &Self, host: Option<&str>, port: u16, args: &[String], shutdown_mode: ShutdownMode) -> i32
```

Starts the application with the headless VNC platform without
password.

`host` is the IP address the VNC server binds to (the loopback
address if `None` or empty), `port` its port, `args` the start
arguments of the application and `shutdown_mode` the shutdown mode
of its lifetime (`OnLastWindowClose` in the original when it is not
given).

Returns the exit code of the application.
## Panics
When the address cannot be parsed or bound (the exceptions of the
original).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/headless_vnc_platform_extensions.rs#L45)

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

### start_with_headless_vnc_platform_with_password

```rust
fn start_with_headless_vnc_platform_with_password(self: &Self, host: Option<&str>, port: u16, password: Option<&str>, args: &[String], shutdown_mode: ShutdownMode) -> i32
```

Starts the application with the headless VNC platform with password:
`password` is the password of the VNC authentication of a connection
(no authentication if it is `None` or blank).
## Panics
When the address cannot be parsed or bound (the exceptions of the
original).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/headless_vnc_platform_extensions.rs#L60)

## Trait implementations

- [`HeadlessVncPlatformExtensions`](/docs/0.5.0/api/ferroui-headless-vnc/trait-headlessvncplatformextensions/)

## Availability

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