---
title: Sides
summary: Parameters for adding or removing pixels from the sides of an image.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/image_optimizer/struct.Sides/
---

**Kind:** Struct  
**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#293

```rust
pub struct Sides {
    pub top: PixelsOrPercentage,
    pub right: PixelsOrPercentage,
    pub bottom: PixelsOrPercentage,
    pub left: PixelsOrPercentage,
}
```

Parameters for adding or removing pixels from the sides of an image.

## Fields

### top

**Type:** `PixelsOrPercentage`

Difference for the top of the image.

### right

**Type:** `PixelsOrPercentage`

Difference for the right of the image.

### bottom

**Type:** `PixelsOrPercentage`

Difference for the bottom of the image.

### left

**Type:** `PixelsOrPercentage`

Difference for the left of the image.

## Trait implementations

### impl Clone for Sides

#### clone

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

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

**Parameters**

- `self`: `&Self`

**Returns**

`Self`

### impl Debug for Sides

#### fmt

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

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

**Parameters**

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

**Returns**

`$crate::fmt::Result`

### impl Serialize for Sides

#### serialize

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

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