pub struct Photo {Show 41 fields
pub id: i64,
pub file_path: String,
pub file_name: String,
pub file_hash: String,
pub file_size: i64,
pub date_taken: Option<DateTime<Utc>>,
pub date_taken_source: Option<String>,
pub gps_latitude: Option<f64>,
pub gps_longitude: Option<f64>,
pub location_city: Option<String>,
pub location_country: Option<String>,
pub camera_make: Option<String>,
pub camera_model: Option<String>,
pub iso: Option<i32>,
pub aperture: Option<String>,
pub shutter_speed: Option<String>,
pub focal_length: Option<String>,
pub lens_model: Option<String>,
pub flash: Option<String>,
pub gps_altitude: Option<f64>,
pub width: Option<i32>,
pub height: Option<i32>,
pub orientation: i32,
pub media_type: MediaType,
pub duration_ms: Option<i64>,
pub video_codec: Option<String>,
pub audio_codec: Option<String>,
pub frame_rate: Option<f32>,
pub bitrate: Option<i64>,
pub has_audio: bool,
pub thumbnail_path: Option<String>,
pub faces_processed: bool,
pub content_category: ContentCategory,
pub ocr_text: Option<String>,
pub ocr_processed: bool,
pub ocr_confidence: Option<f32>,
pub is_favorite: bool,
pub is_trashed: bool,
pub trashed_at: Option<DateTime<Utc>>,
pub indexed_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Represents a photo in the library
Fields§
§id: i64§file_path: String§file_name: String§file_hash: String§file_size: i64§date_taken: Option<DateTime<Utc>>§date_taken_source: Option<String>§gps_latitude: Option<f64>§gps_longitude: Option<f64>§location_city: Option<String>§location_country: Option<String>§camera_make: Option<String>§camera_model: Option<String>§iso: Option<i32>§aperture: Option<String>§shutter_speed: Option<String>§focal_length: Option<String>§lens_model: Option<String>§flash: Option<String>§gps_altitude: Option<f64>§width: Option<i32>§height: Option<i32>§orientation: i32§media_type: MediaType§duration_ms: Option<i64>§video_codec: Option<String>§audio_codec: Option<String>§frame_rate: Option<f32>§bitrate: Option<i64>§has_audio: bool§thumbnail_path: Option<String>§faces_processed: bool§content_category: ContentCategory§ocr_text: Option<String>§ocr_processed: bool§ocr_confidence: Option<f32>§is_favorite: bool§is_trashed: bool§trashed_at: Option<DateTime<Utc>>§indexed_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl Photo
impl Photo
Sourcepub fn has_location(&self) -> bool
pub fn has_location(&self) -> bool
Check if this photo has GPS coordinates
Sourcepub fn location_string(&self) -> Option<String>
pub fn location_string(&self) -> Option<String>
Get a human-readable location string
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Photo
impl<'de> Deserialize<'de> for Photo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Photo
impl RefUnwindSafe for Photo
impl Send for Photo
impl Sync for Photo
impl Unpin for Photo
impl UnsafeUnpin for Photo
impl UnwindSafe for Photo
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> 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