# Struct envelope::Rejection

> A command the host rejects before dispatch; send `Rejection::into_response` back.

`zaun_community_protocol::envelope::Rejection` · Struct

```rust
pub struct Rejection { … }
```

A command the host rejects before dispatch; send `Rejection::into_response` back.

## Fields

### `request_id: Option<RequestId>`

The command's `request_id` when it could be read, else `None` (`null`).

### `error: ErrorBody`

The error to answer with.

## Methods

### `into_response`

```rust
pub fn into_response(self) -> ResponseEnvelope
```

The response envelope to send.

## Trait implementations

`Clone`, `Debug`

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/envelope/inbound/struct.Rejection.html)
