PixelsOrPercentage

Enumin image_optimizerfastly 0.13.1View source
pub enum PixelsOrPercentage {
Pixels(u32),
Percentage(f64),
}

Specify a position along an axis in an image.

Variants

Pixels

Specify a position in pixels.

0: u32

Percentage

Specify a position in percentage of the image size.

0: f64

Trait implementations

impl Clone for PixelsOrPercentage

fn clone(&self) -> Self

Parameters

self: &Self

Returns

Self

impl Debug for PixelsOrPercentage

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

Parameters

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

Returns

$crate::fmt::Result

impl Display for PixelsOrPercentage

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

Parameters

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

Returns

fmt::Result

impl Serialize for PixelsOrPercentage

serialize

View source
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

Blanket implementations