# Struct client::Response

> A final response. `Debug` hides the body, which may embed a secret (an invitation link).

`zaun_community_protocol::client::Response` · Struct

```rust
pub struct Response { … }
```

A final response. `Debug` hides the body, which may embed a secret (an invitation link).

## Fields

### `request_id: RequestId`

The request it answers.

### `kind: &'static str`

The command name.

### `result: Result<Box<RawValue>, ErrorBody>`

The `ok` body exactly as received, or the error.

## Methods

### `decode`

```rust
pub fn decode<B>(&self) -> Result<<B as >::Response, Option<ErrorBody>>
```

Decodes a successful body as `B`'s response type.

# Errors
`Err(Some(error))` for an error response, `Err(None)` for a body that is not a `B`
response.

## Trait implementations

`Clone`, `Debug`

[Full rustdoc page](/docs/api/rust/zaun-community-protocol/zaun_community_protocol/client/event/struct.Response.html)
