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 u8)

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

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.