#[non_exhaustive]pub struct PhotoFacts {
pub taken: Option<String>,
pub camera: Option<String>,
pub lens: Option<String>,
pub shutter: Option<f64>,
pub aperture: Option<f32>,
pub iso: Option<u32>,
pub focal_length: Option<f32>,
pub rating: Option<u8>,
}Expand description
What a photo’s metadata says (EXIF, XMP), as a provider reads it: the
preview pane shows it in one order, as Dolphin’s information panel and a
photo application’s loupe do, whichever provider read it. Made with
PhotoFacts::default and its builders.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.taken: Option<String>When it was taken, as the camera says: its local time, without a
zone (2026-01-15 10:04:00).
camera: Option<String>The camera (make and model).
lens: Option<String>§shutter: Option<f64>The exposure time, in seconds.
aperture: Option<f32>The aperture’s f-number.
iso: Option<u32>§focal_length: Option<f32>The focal length, in millimetres.
rating: Option<u8>From 0 to 5 stars.
Implementations§
Source§impl PhotoFacts
impl PhotoFacts
Sourcepub fn taken(self, when: &str) -> Self
pub fn taken(self, when: &str) -> Self
When it was taken. EXIF’s form (2026:01:15 10:04:00) reads as a date
(2026-01-15 10:04:00); anything else is shown as given.
pub fn camera(self, camera: &str) -> Self
pub fn lens(self, lens: &str) -> Self
pub fn iso(self, iso: u32) -> Self
Sourcepub fn focal_length(self, mm: f32) -> Self
pub fn focal_length(self, mm: f32) -> Self
The focal length, in millimetres.
Sourcepub fn exposure_text(&self) -> Option<String>
pub fn exposure_text(&self) -> Option<String>
The exposure as one line: 1/250 s f/5.6 ISO 200; None without
any of the three.
Trait Implementations§
Source§impl Clone for PhotoFacts
impl Clone for PhotoFacts
Source§fn clone(&self) -> PhotoFacts
fn clone(&self) -> PhotoFacts
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PhotoFacts
impl Debug for PhotoFacts
Source§impl Default for PhotoFacts
impl Default for PhotoFacts
Source§fn default() -> PhotoFacts
fn default() -> PhotoFacts
Returns the “default value” for a type. Read more
Source§impl PartialEq for PhotoFacts
impl PartialEq for PhotoFacts
impl StructuralPartialEq for PhotoFacts
Auto Trait Implementations§
impl Freeze for PhotoFacts
impl RefUnwindSafe for PhotoFacts
impl Send for PhotoFacts
impl Sync for PhotoFacts
impl Unpin for PhotoFacts
impl UnsafeUnpin for PhotoFacts
impl UnwindSafe for PhotoFacts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.