Enum exif::Value[][src]

pub enum Value<'a> {
    Byte(Vec<u8>),
    Ascii(Vec<&'a [u8]>),
    Short(Vec<u16>),
    Long(Vec<u32>),
    Rational(Vec<Rational>),
    SByte(Vec<i8>),
    Undefined(&'a [u8]u32),
    SShort(Vec<i16>),
    SLong(Vec<i32>),
    SRational(Vec<SRational>),
    Float(Vec<f32>),
    Double(Vec<f64>),
    Unknown(u16u32u32),
}

Types and values of TIFF fields (for Exif attributes).

Variants

Vector of 8-bit unsigned integers.

Vector of slices of 8-bit bytes containing 7-bit ASCII characters. The trailing null characters are not included. Note that the 8th bits may present if a non-conforming data is given.

Vector of 16-bit unsigned integers.

Vector of 32-bit unsigned integers.

Vector of unsigned rationals. An unsigned rational number is a pair of 32-bit unsigned integers.

Vector of 8-bit signed integers. Unused in the Exif specification.

Slice of 8-bit bytes.

The second member keeps the offset of the value in the Exif data. The interpretation of the value does not generally depend on the location, but if it does, the offset information helps. When encoding Exif, it is ignored.

Vector of 16-bit signed integers. Unused in the Exif specification.

Vector of 32-bit signed integers.

Vector of signed rationals. A signed rational number is a pair of 32-bit signed integers.

Vector of 32-bit (single precision) floating-point numbers. Unused in the Exif specification.

Vector of 64-bit (double precision) floating-point numbers. Unused in the Exif specification.

The type is unknown to this implementation. The associated values are the type, the count, and the offset of the "Value Offset" element.

Methods

impl<'a> Value<'a>
[src]

Returns an object that implements std::fmt::Display for printing a value in a tag-specific format. The tag of the value is specified as the argument.

Examples

use exif::{Value, Tag};
let val = Value::Undefined(b"0231", 0);
assert_eq!(format!("{}", val.display_as(Tag::ExifVersion)),
           "2.31");
let val = Value::Short(vec![2]);
assert_eq!(format!("{}", val.display_as(Tag::ResolutionUnit)),
           "pixels per inch");

Returns the unsigned integer at the given position. None is returned if the value type is not unsigned integer (BYTE, SHORT, or LONG) or the position is out of bounds.

Returns an iterator over the unsigned integers (BYTE, SHORT, or LONG). The iterator yields u32 regardless of the underlying integer size. The returned iterator implements Iterator and ExactSizeIterator traits. None is returned if the value is not an unsigned integer type.

Trait Implementations

impl<'a> Debug for Value<'a>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for Value<'a>

impl<'a> Sync for Value<'a>