PointOrOffset

Enumin image_optimizerfastly 0.13.1View source
pub enum PointOrOffset {
Point(PixelsOrPercentage),
Offset(u32),
}

Specify a position along an axis in an image.

Variants

Point

An offset relative to the top left of the image.

0: PixelsOrPercentage

Offset

An offset relative to the center of the image, specified as a percentage of the image size.

0: u32

Trait implementations

impl Clone for PointOrOffset

fn clone(&self) -> Self

Parameters

self: &Self

Returns

Self

impl Debug for PointOrOffset

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

Parameters

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

Returns

$crate::fmt::Result

impl Display for PointOrOffset

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

Parameters

self: &Self
fmt: &mut fmt::Formatter

Returns

fmt::Result

impl Serialize for PointOrOffset

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