---
title: Acl
summary: A Compute ACL.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/acl/struct.Acl/
---

**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.rs#55

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

A Compute ACL.

## Methods

### open

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

```rust
fn open(name: &str) -> Result<Self, OpenError>
```

Open an ACL linked to the current service with the given link name.

**Parameters**

- `name`: `&str`

**Returns**

`Result<Self, OpenError>`

### try_lookup

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

```rust
fn try_lookup(&self, ip: IpAddr) -> Result<Option<LookupMatch>, LookupError>
```

Perform a lookup of the given IP address in the ACL.

If no matches are found, then `Ok(None)` is returned.

**Parameters**

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

**Returns**

`Result<Option<LookupMatch>, LookupError>`

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