Skip to main content

Exif

Struct Exif 

Source
pub struct Exif {
Show 45 fields pub orientation: Option<u16>, pub copyright: Option<String>, pub artist: Option<String>, pub lens_spec: Option<[Rational; 4]>, pub exposure_time: Option<Rational>, pub fnumber: Option<Rational>, pub aperture_value: Option<Rational>, pub brightness_value: Option<SRational>, pub iso_speed_ratings: Option<u16>, pub iso_speed: Option<u32>, pub recommended_exposure_index: Option<u32>, pub sensitivity_type: Option<u16>, pub exposure_bias: Option<SRational>, pub date_time_original: Option<String>, pub create_date: Option<String>, pub modify_date: Option<String>, pub exposure_program: Option<u16>, pub timezone_offset: Option<Vec<i16>>, pub offset_time: Option<String>, pub offset_time_original: Option<String>, pub offset_time_digitized: Option<String>, pub sub_sec_time: Option<String>, pub sub_sec_time_original: Option<String>, pub sub_sec_time_digitized: Option<String>, pub shutter_speed_value: Option<SRational>, pub max_aperture_value: Option<Rational>, pub subject_distance: Option<Rational>, pub metering_mode: Option<u16>, pub light_source: Option<u16>, pub flash: Option<u16>, pub focal_length: Option<Rational>, pub image_number: Option<u32>, pub color_space: Option<u16>, pub flash_energy: Option<Rational>, pub exposure_mode: Option<u16>, pub white_balance: Option<u16>, pub scene_capture_type: Option<u16>, pub subject_distance_range: Option<u16>, pub owner_name: Option<String>, pub serial_number: Option<String>, pub lens_serial_number: Option<String>, pub lens_make: Option<String>, pub lens_model: Option<String>, pub gps: Option<ExifGPS>, pub user_comment: Option<String>,
}
Expand description

This struct contains the EXIF information. If a property accepts diffent data types, the type with the best accuracy is choosen.

Fields§

§orientation: Option<u16>§copyright: Option<String>§artist: Option<String>§lens_spec: Option<[Rational; 4]>§exposure_time: Option<Rational>§fnumber: Option<Rational>§aperture_value: Option<Rational>§brightness_value: Option<SRational>§iso_speed_ratings: Option<u16>§iso_speed: Option<u32>§recommended_exposure_index: Option<u32>§sensitivity_type: Option<u16>§exposure_bias: Option<SRational>§date_time_original: Option<String>§create_date: Option<String>§modify_date: Option<String>§exposure_program: Option<u16>§timezone_offset: Option<Vec<i16>>§offset_time: Option<String>§offset_time_original: Option<String>§offset_time_digitized: Option<String>§sub_sec_time: Option<String>§sub_sec_time_original: Option<String>§sub_sec_time_digitized: Option<String>§shutter_speed_value: Option<SRational>§max_aperture_value: Option<Rational>§subject_distance: Option<Rational>§metering_mode: Option<u16>§light_source: Option<u16>§flash: Option<u16>§focal_length: Option<Rational>§image_number: Option<u32>§color_space: Option<u16>§flash_energy: Option<Rational>§exposure_mode: Option<u16>§white_balance: Option<u16>§scene_capture_type: Option<u16>§subject_distance_range: Option<u16>§owner_name: Option<String>§serial_number: Option<String>§lens_serial_number: Option<String>§lens_make: Option<String>§lens_model: Option<String>§gps: Option<ExifGPS>§user_comment: Option<String>

Implementations§

Source§

impl Exif

Source

pub fn new(root_or_exif: &IFD) -> Result<Self>

Read EXIF data. As some EXIF tags located in the root IFD, we accept both IFDs here.

Source

pub fn extend_from_ifd(&mut self, ifd: &IFD) -> Result<()>

Extend the EXIF info from this IFD. If the IFD contains a ExifIFD, extend from this IFD, too.

Source

pub fn extend_from_gps_ifd(&mut self, ifd: &IFD) -> Result<()>

Extend the EXIF info from this IFD. If the IFD contains a ExifIFD, extend from this IFD, too.

Trait Implementations§

Source§

impl Clone for Exif

Source§

fn clone(&self) -> Exif

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Exif

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Exif

Source§

fn default() -> Exif

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Exif

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Ord for Exif

Source§

fn cmp(&self, other: &Exif) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Exif

Source§

fn eq(&self, other: &Exif) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for Exif

Source§

fn partial_cmp(&self, other: &Exif) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for Exif

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Exif

Source§

impl StructuralPartialEq for Exif

Auto Trait Implementations§

§

impl Freeze for Exif

§

impl RefUnwindSafe for Exif

§

impl Send for Exif

§

impl Sync for Exif

§

impl Unpin for Exif

§

impl UnsafeUnpin for Exif

§

impl UnwindSafe for Exif

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, Ctx> BundleDefault<Ctx> for T
where T: Default,

Source§

fn default_with_context(_: Ctx) -> T

Creates a default value with the given context.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,