pub enum Orientation {
Normal = 1,
FlipH = 2,
Rotate180 = 3,
FlipV = 4,
Transpose = 5,
Rotate90 = 6,
Transverse = 7,
Rotate270 = 8,
}Expand description
EXIF orientation.
Variants§
Normal = 1
No transformation (EXIF 1).
FlipH = 2
Mirrored horizontally (EXIF 2).
Rotate180 = 3
Rotated 180° (EXIF 3).
FlipV = 4
Mirrored vertically (EXIF 4).
Transpose = 5
Mirrored along the top-left/bottom-right diagonal (EXIF 5).
Rotate90 = 6
Rotate 90° clockwise to display (EXIF 6).
Transverse = 7
Mirrored along the top-right/bottom-left diagonal (EXIF 7).
Rotate270 = 8
Rotate 270° clockwise (90° anticlockwise) to display (EXIF 8).
Implementations§
Source§impl Orientation
impl Orientation
Sourcepub fn from_exif(v: u32) -> Orientation
pub fn from_exif(v: u32) -> Orientation
From an EXIF Orientation value; unknown values map to Orientation::Normal.
Sourcepub fn from_exif_checked(v: u32) -> Option<Orientation>
pub fn from_exif_checked(v: u32) -> Option<Orientation>
From an EXIF Orientation value; None for values outside 1-8.
Sourcepub fn swaps_dimensions(self) -> bool
pub fn swaps_dimensions(self) -> bool
True if width and height swap when applied.
Trait Implementations§
Source§impl Clone for Orientation
impl Clone for Orientation
Source§fn clone(&self) -> Orientation
fn clone(&self) -> Orientation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Orientation
Source§impl Debug for Orientation
impl Debug for Orientation
Source§impl Default for Orientation
impl Default for Orientation
Source§fn default() -> Orientation
fn default() -> Orientation
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Orientation
impl<'de> Deserialize<'de> for Orientation
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Orientation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Orientation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Orientation
Source§impl Hash for Orientation
impl Hash for Orientation
Source§impl PartialEq for Orientation
impl PartialEq for Orientation
Source§impl Serialize for Orientation
impl Serialize for Orientation
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Orientation
Auto Trait Implementations§
impl Freeze for Orientation
impl RefUnwindSafe for Orientation
impl Send for Orientation
impl Sync for Orientation
impl Unpin for Orientation
impl UnsafeUnpin for Orientation
impl UnwindSafe for Orientation
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
Source§impl<T, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
impl<T, Ctx> BundleDefault<Ctx> for Twhere
T: Default,
Source§fn default_with_context(_: Ctx) -> T
fn default_with_context(_: Ctx) -> T
Creates a default value with the given context.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more