---
title: Orientation
summary: The orient parameter controls the cardinal orientation of the image.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/image_optimizer/enum.Orientation/
---

**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#332

```rust
#[repr(u8)]
pub enum Orientation {
    Default = 1,
    FlipHorizontal = 2,
    FlipHorizontalAndVertical = 3,
    FlipVertical = 4,
    FlipHorizontalOrientLeft = 5,
    OrientRight = 6,
    FlipHorizontalOrientRight = 7,
    OrientLeft = 8,
}
```

The orient parameter controls the cardinal orientation of the image.

## Variants

### Default

**Value:** `1`

Default to image as-is.

### FlipHorizontal

**Value:** `2`

Flip the image horizontally.

### FlipHorizontalAndVertical

**Value:** `3`

Flip the image horizontally and vertically.

### FlipVertical

**Value:** `4`

Flip the image vertically.

### FlipHorizontalOrientLeft

**Value:** `5`

Flip the image horizontally, then orient the image left.

### OrientRight

**Value:** `6`

Orient the image right.

### FlipHorizontalOrientRight

**Value:** `7`

Flip the image horizontally, then orient the image right.

### OrientLeft

**Value:** `8`

Orient the image left.

## Trait implementations

### impl Clone for Orientation

#### clone

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

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

**Parameters**

- `self`: `&Self`

**Returns**

`Self`

### impl Debug for Orientation

#### fmt

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

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

**Parameters**

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

**Returns**

`$crate::fmt::Result`

### impl Serialize for Orientation

#### serialize

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

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

**Parameters**

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

**Returns**

`::core::result::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>`
