# VncError

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-headless-vnc/remote_viewing/vnc/struct-vncerror/

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

```rust
struct VncError
```

The error of a problem with the VNC client-server communication.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_exception.rs#L10)

## Members

- [`new`](#function-new)
- [`message`](#function-message)
- [`reason`](#function-reason)

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

### new

```rust
fn new(message: impl Into<String>, reason: VncFailureReason, inner_exception: Option<Box<dyn Error + Send + Sync>>) -> Self
```

Initializes a new instance of the `VncError` class, with a
`reason` and optionally the error that caused it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_exception.rs#L23)

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

### message

```rust
fn message(self: &Self) -> &str
```

The error message.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_exception.rs#L36)

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

### reason

```rust
fn reason(self: &Self) -> VncFailureReason
```

Gets the reason the exception was raised.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_exception.rs#L41)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToString`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Same`
- `Debug`
- `Default`
- `Display`
- [`Error`](/docs/0.5.0/api/ferroui-dynamic-data/kernel/struct-error/)
- `ErasedDestructor`
- `IntoEither`

## Availability

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