Format

Enumin image_optimizerfastly 0.13.1View source
1
2
3
4
5
6
7
8
9
10
pub enum Format {
Auto,
AVIF,
GIF,
JPEG,
JPEGXL,
MP4,
PNG,
WebP,
}

Specifies the desired output encoding for the image.

Variants

Auto

Automatically use the best format based on browser support and image/transform characteristics.

AVIF

Convert to AVIF.

GIF

Convert to GIF (Graphics Interchange Format).

JPEG

Convert to JPEG.

JPEGXL

Convert to JPEGXL.

MP4

Convert to MP4.

PNG

Convert to PNG (Portable Network Graphics).

WebP

Convert to WebP.

Trait implementations

impl Clone for Format

fn clone(&self) -> Self

Parameters

self: &Self

Returns

Self

impl Debug for Format

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

Parameters

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

Returns

$crate::fmt::Result

impl Serialize for Format

serialize

View source
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where
__S: Serializer,

Parameters

self: &Self
__serializer: __S

Returns

_serde::__private228::Result<__S::Ok, __S::Error>

Auto trait implementations

Blanket implementations