pub struct Transform {
pub format: Option<Format>,
pub height: Option<u32>,
pub quality: Option<u32>,
pub resize: Option<Resize>,
pub width: Option<u32>,
}
Expand description
- format: Specify the format of the image requested. When using ‘origin’ we force the format to be the same as the original image. When this option is not passed in, images are optimized to modern image formats like Webp.
- height: The height of the image in pixels.
- quality: Set the quality of the returned image. A number from 20 to 100, with 100 being the highest quality. Defaults to 80
- resize: The resize mode can be cover, contain or fill. Defaults to cover. Cover resizes the image to maintain it’s aspect ratio while filling the entire width and height. Contain resizes the image to maintain it’s aspect ratio while fitting the entire image within the width and height. Fill resizes the image to fill the entire width and height. If the object’s aspect ratio does not match the width and height, the image will be stretched to fit.
- width: The width of the image in pixels.
Fields§
§format: Option<Format>
§height: Option<u32>
§quality: Option<u32>
§resize: Option<Resize>
§width: Option<u32>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Transform
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnwindSafe for Transform
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more