Canvas

Structin image_optimizerfastly 0.13.1View source
pub struct Canvas {
pub size: Area,
pub position: Option<Position>,
}

Specify the size of the image canvas.

Fields

size

Area

Specifies the desired width and height.

position

Option<Position>

How to distribute remaining space around the image.

Trait implementations

impl Clone for Canvas

fn clone(&self) -> Self

Parameters

self: &Self

Returns

Self

impl Debug for Canvas

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

Parameters

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

Returns

$crate::fmt::Result

impl Serialize for Canvas

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