---
title: ConfigStoreHandle
summary: A low-level interface to Config Store.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/handle/config_store/struct.ConfigStoreHandle/
---

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

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

A low-level interface to Config Store.

Methods here are typically exposed as the `try_*` APIs on
[`crate::config_store::ConfigStore`](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/config_store/struct.ConfigStore/) and should not be needed directly.
Additionally, the [`get()`](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/handle/config_store/struct.ConfigStoreHandle/#method-get) method allows the caller to configure the
size of the buffer used to receive lookup results from the host. The size of this buffer
is typically managed by APIs exposed in [`crate::config_store::ConfigStore`](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/config_store/struct.ConfigStore/).

## Constants

### INVALID

**Type:** `Self`  
**Flags:** read-only  
**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/config_store/handle.rs#32

An invalid handle.

## Methods

### contains

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/config_store/handle.rs#124

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

Return true if the config store contains an entry with the given key.

**Parameters**

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

**Returns**

`Result<bool, LookupError>`

### from_u32

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/config_store/handle.rs#207

```rust
unsafe fn from_u32(handle: u32) -> Self
```

Make a handle from its underlying representation.

This should only be used when calling the raw ABI directly, and care should be taken not to
reuse or alias handle values.

**Parameters**

- `handle`: `u32`

**Returns**

`Self`

### get

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/config_store/handle.rs#59

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

Lookup a value in this config store.

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/config_store/enum.LookupError/) will be
returned.

**Parameters**

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

**Returns**

`Result<Option<String>, LookupError>`

### is_invalid

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

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

Return true if the [`crate::config_store::ConfigStore`](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/config_store/struct.ConfigStore/) handle is invalid.

**Parameters**

- `self`: `&Self`

**Returns**

`bool`

### is_valid

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

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

Return true if the [`crate::config_store::ConfigStore`](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/config_store/struct.ConfigStore/) handle is valid.

**Parameters**

- `self`: `&Self`

**Returns**

`bool`

### open

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/config_store/handle.rs#39

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

Acquire a handle to an Config Store.

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

**Parameters**

- `name`: `&str`

**Returns**

`Result<Self, OpenError>`

## Trait implementations

### impl Debug for ConfigStoreHandle

#### fmt

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

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

**Parameters**

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

**Returns**

`$crate::fmt::Result`

### impl Hash for ConfigStoreHandle

#### hash

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/config_store/handle.rs#17

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

**Parameters**

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

### impl PartialEq for ConfigStoreHandle

#### eq

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/config_store/handle.rs#17

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