pub enum Action {
Pass,
Resize {
target_width: u32,
target_height: u32,
},
Recompress {
quality: u8,
},
ConvertFormat {
to: String,
},
RasterizeSvg {
target_width: u32,
target_height: u32,
},
Drop {
reason: String,
},
}Expand description
An action to be taken on an image.
Variants§
Pass
No changes needed
Resize
Resize to fit within max_dim (preserving aspect ratio)
Recompress
Recompress at a given JPEG quality
ConvertFormat
Convert from unsupported format to a safe one
RasterizeSvg
Rasterize SVG to PNG
Drop
Drop this image entirely
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Action
impl<'de> Deserialize<'de> for Action
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Action
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
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