pub struct Facts {
pub start: Option<NaiveDateTime>,
pub end: Option<NaiveDateTime>,
pub places: Vec<Place>,
pub people: Vec<(String, usize)>,
pub faces: usize,
pub photos: usize,
pub latitude: Option<f64>,
pub home: Option<(String, String)>,
}Expand description
What a set of photos has in common.
Fields§
§start: Option<NaiveDateTime>§end: Option<NaiveDateTime>§places: Vec<Place>In the order they were first visited.
people: Vec<(String, usize)>Named people and how many of the photos they’re in, most first.
faces: usizeDistinct face clusters, named or not.
photos: usize§latitude: Option<f64>§home: Option<(String, String)>Implementations§
Source§impl Facts
impl Facts
pub fn gather(conn: &Connection, ids: &[i64]) -> Facts
pub fn gather_with_home( conn: &Connection, ids: &[i64], home: Option<(String, String)>, ) -> Facts
Sourcepub fn main_place(&self) -> Option<&Place>
pub fn main_place(&self) -> Option<&Place>
The place most of the photos were taken, when one clearly dominates.
Sourcepub fn main_away_place(&self) -> Option<&Place>
pub fn main_away_place(&self) -> Option<&Place>
The main place, if it isn’t home.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Facts
impl RefUnwindSafe for Facts
impl Send for Facts
impl Sync for Facts
impl Unpin for Facts
impl UnsafeUnpin for Facts
impl UnwindSafe for Facts
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> ⓘ
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