---
title: LookupMatch
summary: LookupMatch is the result of an ACL lookup which found a matching prefix.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/acl/struct.LookupMatch/
---

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

```rust
pub struct LookupMatch { /* private fields */ }
```

LookupMatch is the result of an ACL lookup which found
a matching prefix.

## Methods

### action

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/acl/response.rs#28

```rust
fn action(&self) -> &MatchAction
```

Returns the associated prefix action.

**Parameters**

- `self`: `&Self`

**Returns**

`&MatchAction`

### from_body_handle

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/acl/response.rs#15

```rust
fn from_body_handle<R>(body_handle: R) -> Result<Self, Error>
where
    R: Read,
```

Deserialize the given response body into a LookupMatch.

**Parameters**

- `body_handle`: `R`

**Returns**

`Result<Self, serde_json::error::Error>`

### is_allow

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/acl/response.rs#33

```rust
fn is_allow(&self) -> bool
```

Returns true if action is `Allow`.

**Parameters**

- `self`: `&Self`

**Returns**

`bool`

### is_block

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/acl/response.rs#38

```rust
fn is_block(&self) -> bool
```

Returns true if action is `Block`.

**Parameters**

- `self`: `&Self`

**Returns**

`bool`

### is_other

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/acl/response.rs#43

```rust
fn is_other(&self, other: String) -> bool
```

Returns true if action is `Other` and matches the given value.

**Parameters**

- `self`: `&Self`
- `other`: `String`

**Returns**

`bool`

### prefix

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/acl/response.rs#23

```rust
fn prefix(&self) -> &str
```

Returns the matching prefix.

**Parameters**

- `self`: `&Self`

**Returns**

`&str`

## Trait implementations

### impl Debug for LookupMatch

#### fmt

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/acl/response.rs#5

```rust
fn fmt(&self, f: &mut Formatter<'_>) -> Result
```

**Parameters**

- `self`: `&Self`
- `f`: `&mut $crate::fmt::Formatter`

**Returns**

`$crate::fmt::Result`

### impl Deserialize for LookupMatch

#### deserialize

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/acl/response.rs#5

```rust
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where
    __D: Deserializer<'de>,
```

**Parameters**

- `__deserializer`: `__D`

**Returns**

`_serde::__private228::Result<Self, __D::Error>`

### impl PartialEq for LookupMatch

#### eq

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/acl/response.rs#5

```rust
fn eq(&self, other: &Self) -> bool
```

**Parameters**

- `self`: `&Self`
- `other`: `&Self`

**Returns**

`bool`

### impl Serialize for LookupMatch

#### serialize

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/acl/response.rs#5

```rust
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where
    __S: Serializer,
```

**Parameters**

- `self`: `&Self`
- `__serializer`: `__S`

**Returns**

`_serde::__private228::Result<__S::Ok, __S::Error>`

## Auto trait implementations

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

## Blanket implementations

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