Skip to main content

Photo

Struct Photo 

Source
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

Source

pub fn has_location(&self) -> bool

Check if this photo has GPS coordinates

Source

pub fn location_string(&self) -> Option<String>

Get a human-readable location string

Trait Implementations§

Source§

impl Clone for Photo

Source§

fn clone(&self) -> Photo

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Photo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Photo

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Photo

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,