---
title: Level
summary: The level parameter specifies a set of constraints indicating a degree of required decoder performance for a profile.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/image_optimizer/enum.Level/
---

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

```rust
pub enum Level {
    Level1_0,
    Level1_1,
    Level1_2,
    Level1_3,
    Level2_0,
    Level2_1,
    Level2_2,
    Level3_0,
    Level3_1,
    Level3_2,
    Level4_0,
    Level4_1,
    Level4_2,
    Level5_0,
    Level5_1,
    Level5_2,
    Level6_0,
    Level6_1,
    Level6_2,
}
```

The level parameter specifies a set of constraints indicating
[a degree of required decoder performance](https://en.wikipedia.org/wiki/Advanced_Video_Coding#Levels) for a profile.

This option is only used when converting animated GIFs to the MP4 format and when used in
conjunction with the profile parameter,

## Variants

### Level1_0

Level 1.0

### Level1_1

Level 1.1

### Level1_2

Level 1.2

### Level1_3

Level 1.3

### Level2_0

Level 2.0

### Level2_1

Level 2.1

### Level2_2

Level 2.2

### Level3_0

Level 3.0

### Level3_1

Level 3.1

### Level3_2

Level 3.2

### Level4_0

Level 4.0

### Level4_1

Level 4.1

### Level4_2

Level 4.2

### Level5_0

Level 5.0

### Level5_1

Level 5.1

### Level5_2

Level 5.2

### Level6_0

Level 6.0

### Level6_1

Level 6.1

### Level6_2

Level 6.2

## Trait implementations

### impl Clone for Level

#### clone

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/image_optimizer.rs#510

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

**Parameters**

- `self`: `&Self`

**Returns**

`Self`

### impl Debug for Level

#### fmt

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/image_optimizer.rs#510

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

**Parameters**

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

**Returns**

`$crate::fmt::Result`

### impl Serialize for Level

#### serialize

**Source:** https://docs.rs/crate/fastly/0.13.1/source/src/image_optimizer.rs#553

```rust
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
    S: Serializer,
```

**Parameters**

- `self`: `&Self`
- `serializer`: `S`

**Returns**

`Result<S::Ok, S::Error>`

## Auto trait implementations

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

## Blanket implementations

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