kamadak / exif-rs

Exif parsing library written in pure Rust
BSD 2-Clause "Simplified" License
190 stars 42 forks source link

enum Values now derives PartialEq. #37

Open martinfrances107 opened 6 months ago

martinfrances107 commented 6 months ago

I love this module... It is really useful.

but I am at the stage where I want Field to provide PartialEq,

[ To get this to compile both Rational and SRational and Value need to derive PartialEq. ]

/// A type and values of a TIFF/Exif field.
#[derive(Clone, PartialEq)]
pub enum Value {
    /// Vector of 8-bit unsigned integers.
    Byte(Vec<u8>),
    /// 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.
    Ascii(Vec<Vec<u8>>),
    /// Vector of 16-bit unsigned integers.
    Short(Vec<u16>),
    /// Vector of 32-bit unsigned integers.
    Long(Vec<u32>),

...

}