---
title: DictionaryHandle
summary: A low-level interface to Edge Dictionaries.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/handle/dictionary/struct.DictionaryHandle/
---

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

> **DEPRECATED:** renamed to `ConfigStoreHandle`

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

A low-level interface to Edge Dictionaries.

Unlike the high-level [`Dictionary`](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/dictionary/struct.Dictionary/), this type has methods
that return `Result` values upon failure, rather than panicking. Additionally, the
[`get()`](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/handle/dictionary/struct.DictionaryHandle/#method-get) method allows the caller to configure the size of the buffer used to
received lookup results from the host.

## Constants

### INVALID

**Type:** `Self`  
**Flags:** read-only, since 0.8.6, deprecated  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/dictionary/handle.rs#33

> **DEPRECATED:** use the constant in `ConfigStoreHandle` instead

An invalid handle.

## Methods

### contains

**Flags:** deprecated  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/dictionary/handle.rs#147

> **DEPRECATED:** use the method on `ConfigStoreHandle` instead

```rust
fn contains(&self, key: &str) -> Result<bool, LookupError>
```

Return true if the dictionary contains an entry with the given key.

**Parameters**

- `self`: `&Self`
- `key`: `&str`

**Returns**

`Result<bool, LookupError>`

### get

**Flags:** deprecated  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/dictionary/handle.rs#85

> **DEPRECATED:** use the method on `ConfigStoreHandle` instead

```rust
fn get(&self, key: &str, max_len: usize) -> Result<Option<String>, LookupError>
```

Lookup a value in this dictionary.

If successful, this function returns `Ok(Some(_))` if an entry was found, or `Ok(None)` if
no entry with the given key was found. If the lookup failed, a [`LookupError`](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/dictionary/enum.LookupError/) will be
returned.

**Parameters**

- `self`: `&Self`
- `key`: `&str`
- `max_len`: `usize`

**Returns**

`Result<Option<String>, LookupError>`

### is_invalid

**Flags:** deprecated  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/dictionary/handle.rs#172

> **DEPRECATED:** use the method on `ConfigStoreHandle` instead

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

Return true if the request handle is invalid.

**Parameters**

- `self`: `&Self`

**Returns**

`bool`

### is_valid

**Flags:** deprecated  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/dictionary/handle.rs#162

> **DEPRECATED:** use the method on `ConfigStoreHandle` instead

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

Return true if the request handle is valid.

**Parameters**

- `self`: `&Self`

**Returns**

`bool`

### open

**Flags:** deprecated  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/dictionary/handle.rs#44

> **DEPRECATED:** use the method on `ConfigStoreHandle` instead

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

Acquire a handle to an Edge Dictionary.

If a handle could not be acquired, an [`OpenError`](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/dictionary/enum.OpenError/) will be returned.

**Parameters**

- `name`: `&str`

**Returns**

`Result<Self, OpenError>`

## Trait implementations

### impl Debug for DictionaryHandle

#### fmt

**Flags:** deprecated  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/dictionary/handle.rs#15

> **DEPRECATED:** renamed to `handle::config_store`

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

**Parameters**

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

**Returns**

`$crate::fmt::Result`

### impl Hash for DictionaryHandle

#### hash

**Flags:** deprecated  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/dictionary/handle.rs#16

> **DEPRECATED:** renamed to `handle::config_store`

```rust
fn hash<__H: Hasher>(&self, state: &mut __H)
```

**Parameters**

- `self`: `&Self`
- `state`: `&mut __H`

### impl PartialEq for DictionaryHandle

#### eq

**Flags:** deprecated  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/dictionary/handle.rs#16

> **DEPRECATED:** renamed to `handle::config_store`

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

**Parameters**

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

**Returns**

`bool`

## Auto trait implementations

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

## Blanket implementations

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