Enumin image_optimizerfastly 0.13.1View source
pub enum Fit {
Bounds = 1,
Cover = 2,
Crop = 3,
}

The fit parameter controls how the image will be constrained within the provided size (width and height) values, in order to maintain the correct proportions.

Variants

Bounds

= 1

Resize the image to fit entirely within the specified region, making one dimension smaller if needed.

Cover

= 2

Resize the image to entirely cover the specified region, making one dimension larger if needed.

Crop

= 3

Resize and crop the image centrally to exactly fit the specified region.

Trait implementations

impl Clone for Fit

fn clone(&self) -> Self

Parameters

self: &Self

Returns

Self

impl Debug for Fit

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

Parameters

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

Returns

$crate::fmt::Result

impl Serialize for Fit

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