pub enum PhotoFormat {
Original,
Jpeg,
Png,
Webp,
}Expand description
The image format a photo is delivered in.
Variants§
Original
Keep the picked file’s format if it can pass through; when it must be re-encoded, PNG stays PNG and anything else (HEIC, WebP, …) becomes JPEG.
Jpeg
Png
Webp
Lossy WebP. iOS can’t encode WebP (→ JPEG) and Safari’s canvas can’t (→ PNG); Photo::mime
says what was produced.
Implementations§
Trait Implementations§
Source§impl Clone for PhotoFormat
impl Clone for PhotoFormat
impl Copy for PhotoFormat
Source§impl Debug for PhotoFormat
impl Debug for PhotoFormat
Source§impl Default for PhotoFormat
impl Default for PhotoFormat
Source§impl<'de> Deserialize<'de> for PhotoFormat
impl<'de> Deserialize<'de> for PhotoFormat
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 Eq for PhotoFormat
Source§impl PartialEq for PhotoFormat
impl PartialEq for PhotoFormat
Source§impl Serialize for PhotoFormat
impl Serialize for PhotoFormat
impl StructuralPartialEq for PhotoFormat
Auto Trait Implementations§
impl Forget for PhotoFormat
impl Freeze for PhotoFormat
impl Move for PhotoFormat
impl RefUnwindSafe for PhotoFormat
impl Send for PhotoFormat
impl Sync for PhotoFormat
impl Unpin for PhotoFormat
impl UnsafeUnpin for PhotoFormat
impl UnwindSafe for PhotoFormat
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