pub struct Camera {
pub make: Option<String>,
pub model: Option<String>,
pub lens: Option<String>,
pub exposure: Option<(u32, u32)>,
pub f_number: Option<f64>,
pub iso: Option<u32>,
pub focal_length_mm: Option<f64>,
pub taken: Option<Taken>,
pub location: Option<Location>,
}Expand description
The EXIF a person cares about, as plain values.
Fields§
§make: Option<String>Make as written — often in capitals (FUJIFILM).
model: Option<String>Model as written — sometimes repeats the make (Canon EOS R5),
sometimes does not (X-T5). Camera::body reconciles the two.
lens: Option<String>§exposure: Option<(u32, u32)>Exposure time as the camera’s own fraction, so 1/500 stays 1/500 rather than going through a float and coming back as 1/499.
f_number: Option<f64>§iso: Option<u32>§focal_length_mm: Option<f64>§taken: Option<Taken>When the shutter was pressed, in the camera’s own clock — EXIF usually has no time zone, and inventing one would be a claim this crate has no basis for.
location: Option<Location>Implementations§
Source§impl Camera
impl Camera
Sourcepub fn body(&self) -> Option<String>
pub fn body(&self) -> Option<String>
The camera, the way a person names it: “Fujifilm X-T5”, “Canon EOS R5” — never “FUJIFILM X-T5” or “Canon Canon EOS R5”.
Makers disagree about whether the model repeats the brand, so the brand (the make’s first word) is added only when the model does not already start with it. A make written in capitals is title-cased when it is a word rather than an initialism.
Sourcepub fn exposure_line(&self) -> Option<String>
pub fn exposure_line(&self) -> Option<String>
“1/500 · f/2 · ISO 160” — whichever of the three are known.
Sourcepub fn summary(&self) -> Option<String>
pub fn summary(&self) -> Option<String>
One line for a status bar: “X-T5 · 23mm f/2 · 1/500 · ISO 160”.
The model alone, not Camera::body: the bar is short, and the
brand is the part a person already knows.