Struct exif::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 + PartialOrd,

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

impl PartialEq for Tag

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method 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

This method 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

This method 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

This method 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

This method 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> 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,

§

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>,

§

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>,

§

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.