exif

Struct Tag

Source
pub struct Tag(pub Context, pub u16);
Expand description

A tag of a TIFF/Exif field.

Some well-known tags are provided as associated constants of this type. The constant names follow the Exif specification but not the Rust naming conventions.

A non-predefined tag can also be specified by the context and the number as in Tag(Context::Tiff, 0x100).

Tuple Fields§

§0: Context§1: u16

Implementations§

Source§

impl Tag

Source

pub fn context(self) -> Context

Returns the context of the tag.

§Examples
use exif::{Context, Tag};
assert_eq!(Tag::XResolution.context(), Context::Tiff);
assert_eq!(Tag::DateTimeOriginal.context(), Context::Exif);
Source

pub fn number(self) -> u16

Returns the tag number.

§Examples
use exif::Tag;
assert_eq!(Tag::XResolution.number(), 0x11a);
assert_eq!(Tag::DateTimeOriginal.number(), 0x9003);
Source

pub fn description(&self) -> Option<&str>

Returns the description of the tag.

Source

pub fn default_value(&self) -> Option<Value>

Returns the default value of the tag. None is returned if it is not defined in the standard or it depends on another tag.

Source§

impl Tag

Source

pub const ImageWidth: Tag = _

Source

pub const ImageLength: Tag = _

Source

pub const BitsPerSample: Tag = _

Source

pub const Compression: Tag = _

Source

pub const PhotometricInterpretation: Tag = _

Source

pub const ImageDescription: Tag = _

Source

pub const Make: Tag = _

Manufacturer of the image input equipment.

Source

pub const Model: Tag = _

Model name or number of the image input equipment.

Source

pub const StripOffsets: Tag = _

Source

pub const Orientation: Tag = _

Source

pub const SamplesPerPixel: Tag = _

Source

pub const RowsPerStrip: Tag = _

Source

pub const StripByteCounts: Tag = _

Source

pub const XResolution: Tag = _

Source

pub const YResolution: Tag = _

Source

pub const PlanarConfiguration: Tag = _

Source

pub const ResolutionUnit: Tag = _

Unit of XResolution and YResolution fields.

Source

pub const TransferFunction: Tag = _

Source

pub const Software: Tag = _

Name and version of the software used to create the image.

Source

pub const DateTime: Tag = _

Date and time when the image file was created or last edited. For the time when the picture was taken, see DateTimeOriginal field.

Source

pub const Artist: Tag = _

Source

pub const WhitePoint: Tag = _

Source

pub const PrimaryChromaticities: Tag = _

Source

pub const TileOffsets: Tag = _

Source

pub const TileByteCounts: Tag = _

Source

pub const JPEGInterchangeFormat: Tag = _

Source

pub const JPEGInterchangeFormatLength: Tag = _

Source

pub const YCbCrCoefficients: Tag = _

Source

pub const YCbCrSubSampling: Tag = _

Source

pub const YCbCrPositioning: Tag = _

Source

pub const ReferenceBlackWhite: Tag = _

Source

pub const Copyright: Tag = _

Source

pub const ExposureTime: Tag = _

Source

pub const FNumber: Tag = _

Source

pub const ExposureProgram: Tag = _

Source

pub const SpectralSensitivity: Tag = _

Source

pub const PhotographicSensitivity: Tag = _

Sensitivity of the device.

The value may be represented by standard output sensitivity (SOS), recommended exposure index (REI), or ISO speed. What is stored is designated by SensitivityType field.

This field is 16-bit and may be saturated. For 32-bit values, see StandardOutputSensitivity, RecommendedExposureIndex, ISOSpeed, ISOSpeedLatitudeyyy, and ISOSpeedLatitudezzz fields.

Source

pub const OECF: Tag = _

Source

pub const SensitivityType: Tag = _

Source

pub const StandardOutputSensitivity: Tag = _

Source

pub const RecommendedExposureIndex: Tag = _

Source

pub const ISOSpeed: Tag = _

Source

pub const ISOSpeedLatitudeyyy: Tag = _

Source

pub const ISOSpeedLatitudezzz: Tag = _

Source

pub const ExifVersion: Tag = _

Source

pub const DateTimeOriginal: Tag = _

Date and time when the original image was generated (e.g., the picture was taken by a camera).

Source

pub const DateTimeDigitized: Tag = _

Date and time when the image was stored as digital data. If a picture is taken by a film camera and then digitized later, this value will be different from DateTimeOriginal field.

Source

pub const OffsetTime: Tag = _

Timezone offset for DateTime field.

Source

pub const OffsetTimeOriginal: Tag = _

Timezone offset for DateTimeOriginal field.

Source

pub const OffsetTimeDigitized: Tag = _

Timezone offset for DateTimeDigitized field.

Source

pub const ComponentsConfiguration: Tag = _

Source

pub const CompressedBitsPerPixel: Tag = _

Source

pub const ShutterSpeedValue: Tag = _

Source

pub const ApertureValue: Tag = _

Source

pub const BrightnessValue: Tag = _

Source

pub const ExposureBiasValue: Tag = _

Source

pub const MaxApertureValue: Tag = _

Source

pub const SubjectDistance: Tag = _

Source

pub const MeteringMode: Tag = _

Source

pub const LightSource: Tag = _

Source

pub const Flash: Tag = _

Source

pub const FocalLength: Tag = _

Source

pub const SubjectArea: Tag = _

Source

pub const MakerNote: Tag = _

Source

pub const UserComment: Tag = _

Source

pub const SubSecTime: Tag = _

Subseconds for DateTime field.

Source

pub const SubSecTimeOriginal: Tag = _

Subseconds for DateTimeOriginal field.

Source

pub const SubSecTimeDigitized: Tag = _

Subseconds for DateTimeDigitized field.

Source

pub const Temperature: Tag = _

Source

pub const Humidity: Tag = _

Source

pub const Pressure: Tag = _

Source

pub const WaterDepth: Tag = _

Source

pub const Acceleration: Tag = _

Source

pub const CameraElevationAngle: Tag = _

Source

pub const FlashpixVersion: Tag = _

Source

pub const ColorSpace: Tag = _

Source

pub const PixelXDimension: Tag = _

Source

pub const PixelYDimension: Tag = _

Source

pub const RelatedSoundFile: Tag = _

Source

pub const FlashEnergy: Tag = _

Source

pub const SpatialFrequencyResponse: Tag = _

Source

pub const FocalPlaneXResolution: Tag = _

Source

pub const FocalPlaneYResolution: Tag = _

Source

pub const FocalPlaneResolutionUnit: Tag = _

Unit of FocalPlaneXResolution and FocalPlaneYResolution fields.

Source

pub const SubjectLocation: Tag = _

Source

pub const ExposureIndex: Tag = _

Source

pub const SensingMethod: Tag = _

Source

pub const FileSource: Tag = _

Source

pub const SceneType: Tag = _

Source

pub const CFAPattern: Tag = _

Source

pub const CustomRendered: Tag = _

Source

pub const ExposureMode: Tag = _

Source

pub const WhiteBalance: Tag = _

Source

pub const DigitalZoomRatio: Tag = _

Source

pub const FocalLengthIn35mmFilm: Tag = _

Source

pub const SceneCaptureType: Tag = _

Source

pub const GainControl: Tag = _

Source

pub const Contrast: Tag = _

Source

pub const Saturation: Tag = _

Source

pub const Sharpness: Tag = _

Source

pub const DeviceSettingDescription: Tag = _

Source

pub const SubjectDistanceRange: Tag = _

Source

pub const ImageUniqueID: Tag = _

Source

pub const CameraOwnerName: Tag = _

Source

pub const BodySerialNumber: Tag = _

Source

pub const LensSpecification: Tag = _

Source

pub const LensMake: Tag = _

Source

pub const LensModel: Tag = _

Source

pub const LensSerialNumber: Tag = _

Source

pub const CompositeImage: Tag = _

Source

pub const SourceImageNumberOfCompositeImage: Tag = _

Source

pub const SourceExposureTimesOfCompositeImage: Tag = _

Source

pub const Gamma: Tag = _

Source

pub const GPSVersionID: Tag = _

Source

pub const GPSLatitudeRef: Tag = _

Source

pub const GPSLatitude: Tag = _

Source

pub const GPSLongitudeRef: Tag = _

Source

pub const GPSLongitude: Tag = _

Source

pub const GPSAltitudeRef: Tag = _

Source

pub const GPSAltitude: Tag = _

Source

pub const GPSTimeStamp: Tag = _

Source

pub const GPSSatellites: Tag = _

Source

pub const GPSStatus: Tag = _

Source

pub const GPSMeasureMode: Tag = _

Source

pub const GPSDOP: Tag = _

Source

pub const GPSSpeedRef: Tag = _

Source

pub const GPSSpeed: Tag = _

Source

pub const GPSTrackRef: Tag = _

Source

pub const GPSTrack: Tag = _

Source

pub const GPSImgDirectionRef: Tag = _

Source

pub const GPSImgDirection: Tag = _

Source

pub const GPSMapDatum: Tag = _

Source

pub const GPSDestLatitudeRef: Tag = _

Source

pub const GPSDestLatitude: Tag = _

Source

pub const GPSDestLongitudeRef: Tag = _

Source

pub const GPSDestLongitude: Tag = _

Source

pub const GPSDestBearingRef: Tag = _

Source

pub const GPSDestBearing: Tag = _

Source

pub const GPSDestDistanceRef: Tag = _

Source

pub const GPSDestDistance: Tag = _

Source

pub const GPSProcessingMethod: Tag = _

Source

pub const GPSAreaInformation: Tag = _

Source

pub const GPSDateStamp: Tag = _

Source

pub const GPSDifferential: Tag = _

Source

pub const GPSHPositioningError: Tag = _

Source

pub const InteroperabilityIndex: Tag = _

Source

pub const InteroperabilityVersion: Tag = _

Source

pub const RelatedImageFileFormat: Tag = _

Source

pub const RelatedImageWidth: Tag = _

Source

pub const RelatedImageLength: Tag = _

Trait Implementations§

Source§

impl Clone for Tag

Source§

fn clone(&self) -> Tag

Returns a copy 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 Tag

Source§

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

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

impl Display for Tag

Source§

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

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

impl Hash for Tag

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Tag

Source§

fn cmp(&self, other: &Tag) -> 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 Tag

Source§

fn eq(&self, other: &Tag) -> 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 Tag

Source§

fn partial_cmp(&self, other: &Tag) -> 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 Copy for Tag

Source§

impl Eq for Tag

Source§

impl StructuralPartialEq for Tag

Auto Trait Implementations§

§

impl Freeze for Tag

§

impl RefUnwindSafe for Tag

§

impl Send for Tag

§

impl Sync for Tag

§

impl Unpin for Tag

§

impl UnwindSafe for Tag

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. 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.