---
title: InspectConfig
summary: Configuration for inspecting a Request using Security.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/security/struct.InspectConfig/
---

**Kind:** Struct  
**Module:** [security](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/security/)  
**Package:** fastly 0.13.1  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/security.rs#154

```rust
pub struct InspectConfig<'a> { /* private fields */ }
```

Configuration for inspecting a [`Request`](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/http/request/struct.Request/) using Security.

## Methods

### buffer_size

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/security.rs#217

```rust
fn buffer_size(self, buffer_size: usize) -> Self
```

Set a buffer size for the response.

**Parameters**

- `self`: `Self`
- `buffer_size`: `usize`

**Returns**

`Self`

### client_ip

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/security.rs#199

```rust
fn client_ip(self, ip: IpAddr) -> Self
```

Specify an explicit client IP address to inspect.

By default, [inspect](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/security/fn.inspect/) will use the IP address that made the request
to the running Compute service, but you may want to use a different
IP when service chaining or if requests are proxied from outside of
Fastly's network.

**Parameters**

- `self`: `Self`
- `ip`: `IpAddr`

**Returns**

`Self`

### corp

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/security.rs#205

```rust
fn corp(self, name: impl ToString) -> Self
```

Set a corp name for the configuration.

**Parameters**

- `self`: `Self`
- `name`: `impl ToString`

**Returns**

`Self`

### from_handles

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/security.rs#174

```rust
fn from_handles(req_handle: &'a RequestHandle, body_handle: &'a BodyHandle) -> Self
```

Create a new configuration for inspecting an explicit pair of handles with Security.

**Parameters**

- `req_handle`: `&RequestHandle`
- `body_handle`: `&BodyHandle`

**Returns**

`Self`

### from_request

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/security.rs#187

```rust
fn from_request(req: &'a Request) -> Self
```

Create a new configuration for inspecting the handles associated with a given [Request](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/http/request/struct.Request/) with
Security.

**Parameters**

- `req`: `&Request`

**Returns**

`Self`

### new

**Flags:** deprecated  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/security.rs#169

> **DEPRECATED:** Use InspectConfig::from_handles or InspectConfig::from_request instead

```rust
fn new(req_handle: &'a RequestHandle, body_handle: &'a BodyHandle) -> Self
```

Create a new configuration for inspecting a request with Security.

**Parameters**

- `req_handle`: `&RequestHandle`
- `body_handle`: `&BodyHandle`

**Returns**

`Self`

### workspace

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/security.rs#211

```rust
fn workspace(self, name: impl ToString) -> Self
```

Set a workspace name for the configuration.

**Parameters**

- `self`: `Self`
- `name`: `impl ToString`

**Returns**

`Self`

## Auto trait implementations

- `Freeze`
- `RefUnwindSafe`
- `Send`
- `Sync`
- `Unpin`
- `UnsafeUnpin`
- `UnwindSafe`

## Blanket implementations

- `Any`
- `Borrow<T>`
- `BorrowMut<T>`
- `Downcast`
- `DowncastSync`
- `ErasedDestructor`
- `From<T>`
- `Into<U>`
- `IntoEither`
- `Same`
- `TryFrom<U>`
- `TryInto<U>`
