#[non_exhaustive]pub struct OrientationMetadata {
pub exif: Option<Orientation>,
pub maker_note: Option<Orientation>,
pub auto_rotate: Option<bool>,
pub resolved: Orientation,
pub source: OrientationSource,
pub policy: OrientationPolicy,
}Expand description
Orientation records of a file and the value resolved from them.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.exif: Option<Orientation>The standard TIFF/EXIF Orientation tag; None when missing or not a valid
value (1-8).
maker_note: Option<Orientation>The vendor orientation record (MakerNote or equivalent), when present.
auto_rotate: Option<bool>The camera’s Auto Rotate setting (Some(true) = on), when recorded.
resolved: OrientationThe orientation to apply to the image (equal to RawMetadata::orientation).
source: OrientationSourceWhich record resolved comes from.
policy: OrientationPolicyThe policy that chose resolved.
Implementations§
Source§impl OrientationMetadata
impl OrientationMetadata
Sourcepub fn resolve(
exif: Option<Orientation>,
maker_note: Option<Orientation>,
auto_rotate: Option<bool>,
policy: OrientationPolicy,
) -> Self
pub fn resolve( exif: Option<Orientation>, maker_note: Option<Orientation>, auto_rotate: Option<bool>, policy: OrientationPolicy, ) -> Self
Combine the records of a file under policy.
Sourcepub fn from_container(orientation: Orientation) -> Self
pub fn from_container(orientation: Orientation) -> Self
Only the container’s standard orientation field is known (Normal is treated
as “nothing recorded”).
Sourcepub fn camera_override(self, orientation: Orientation) -> Self
pub fn camera_override(self, orientation: Orientation) -> Self
A fixed per-camera orientation that replaces whatever the file records.
Trait Implementations§
Source§impl Clone for OrientationMetadata
impl Clone for OrientationMetadata
impl Copy for OrientationMetadata
Source§impl Debug for OrientationMetadata
impl Debug for OrientationMetadata
Source§impl Default for OrientationMetadata
impl Default for OrientationMetadata
impl Eq for OrientationMetadata
Source§impl Hash for OrientationMetadata
impl Hash for OrientationMetadata
Source§impl PartialEq for OrientationMetadata
impl PartialEq for OrientationMetadata
impl StructuralPartialEq for OrientationMetadata
Auto Trait Implementations§
impl Freeze for OrientationMetadata
impl RefUnwindSafe for OrientationMetadata
impl Send for OrientationMetadata
impl Sync for OrientationMetadata
impl Unpin for OrientationMetadata
impl UnsafeUnpin for OrientationMetadata
impl UnwindSafe for OrientationMetadata
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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