---
title: HandleError
summary: HandleError is for errors that might arise when using the low level handle interface. For example trying to use a handle for an operation that has already been closed out.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/error/enum.HandleError/
---

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

```rust
#[non_exhaustive]
pub enum HandleError {
    ClosedHandle(HandleKind),
    InvalidHandle,
}
```

`HandleError` is for errors that might arise when using the low level handle
interface. For example trying to use a handle for an operation that has
already been closed out.

## Variants

### ClosedHandle

- `0`: `HandleKind`

When using close on a handle, this error will be thrown if the resource
for the handle has been removed from the session already

### InvalidHandle

A handle did not exist or was the wrong type

## Trait implementations

### impl Clone for HandleError

#### clone

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/error.rs#106

```rust
fn clone(&self) -> Self
```

**Parameters**

- `self`: `&Self`

**Returns**

`Self`

### impl Debug for HandleError

#### fmt

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/error.rs#106

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

**Parameters**

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

**Returns**

`$crate::fmt::Result`

### impl Display for HandleError

#### fmt

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/error.rs#106

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

**Parameters**

- `self`: `&Self`
- `__formatter`: `&mut ::core::fmt::Formatter`

**Returns**

`::core::fmt::Result`

### impl PartialEq for HandleError

#### eq

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/error.rs#106

```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>`
- `CloneToUninit`
- `Downcast`
- `DowncastSync`
- `Equivalent<K>`
- `ErasedDestructor`
- `From<T>`
- `Into<U>`
- `IntoEither`
- `Same`
- `ToOwned`
- `ToString`
- `TryFrom<U>`
- `TryInto<U>`
