Enumin image_optimizerfastly 0.13.1View source
pub enum Auto {
AVIF,
WebP,
}

Enables optimizations based on content negotiation.

This functionality is also possible by setting ImageOptimizerOptions::format to Format::Auto, which will additionally support JPEGXL output.

Variants

AVIF

If the browser's Accept header indicates compatibility, deliver an AVIF image.

WebP

If the browser's Accept header indicates compatibility, deliver a WebP image.

Trait implementations

impl Clone for Auto

fn clone(&self) -> Self

Parameters

self: &Self

Returns

Self

impl Debug for Auto

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

Parameters

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

Returns

$crate::fmt::Result

impl Serialize for Auto

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