---
title: MatchAction
summary: MatchAction represents an action associated with an ACL prefix.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/acl/enum.MatchAction/
---

**Kind:** Enum  
**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#51

```rust
pub enum MatchAction {
    Allow,
    Block,
    Other(String),
}
```

MatchAction represents an action associated with an ACL prefix.

## Variants

### Allow

Allow prefix.

### Block

Block prefix.

### Other

- `0`: `String`

Unexpected or new action.

## Trait implementations

### impl Debug for MatchAction

#### fmt

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

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

**Parameters**

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

**Returns**

`$crate::fmt::Result`

### impl Deserialize for MatchAction

#### deserialize

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

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

**Parameters**

- `de`: `D`

**Returns**

`Result<Self, D::Error>`

### impl PartialEq for MatchAction

#### eq

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

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

**Parameters**

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

**Returns**

`bool`

### impl Serialize for MatchAction

#### serialize

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

```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>`
