---
title: Sharpen
summary: Options for increasing the definition of the edges of objects in an image.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/image_optimizer/struct.Sharpen/
---

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

```rust
pub struct Sharpen {
    pub amount: u8,
    pub radius: f32,
    pub threshold: u8,
}
```

Options for increasing the definition of the edges of objects in an image.

## Fields

### amount

**Type:** `u8`

Amount parameter for the unsharp mask.

This should be a value between 0 and 10.

### radius

**Type:** `f32`

Radius parameter for the unsharp mask.

This should be a value between 0.5 and 1000.

### threshold

**Type:** `u8`

Threshold parameter for the unsharp mask.

This should be a value between 0 and 255.

## Trait implementations

### impl Clone for Sharpen

#### clone

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

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

**Parameters**

- `self`: `&Self`

**Returns**

`Self`

### impl Debug for Sharpen

#### fmt

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

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

**Parameters**

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

**Returns**

`$crate::fmt::Result`

### impl Serialize for Sharpen

#### serialize

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

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