pub struct FileRecord {
pub size: u64,
pub mtime_ns: i64,
pub sha256: String,
pub uploaded_md5: Option<String>,
pub capture_date: NaiveDate,
pub date_source: DateSource,
pub image_uri: Option<String>,
pub album_key: Option<String>,
pub failed: Option<String>,
}Expand description
One local file as of its last successful upload (or permanent failure). Field names are short: there’s one record per file in the library.
Fields§
§size: u64§mtime_ns: i64§sha256: StringSHA-256 of the file (for a RAW: of the RAW file, not the JPEG).
uploaded_md5: Option<String>MD5 of what was uploaded: the file, or the JPEG rendered from a RAW.
capture_date: NaiveDate§date_source: DateSource§image_uri: Option<String>The SmugMug (album) image this file is, once uploaded or linked.
album_key: Option<String>§failed: Option<String>Why SmugMug refused this file, if it did (e.g. too big). Not retried until the file changes.
Implementations§
Source§impl FileRecord
impl FileRecord
Sourcepub fn matches(&self, file: &ScannedFile) -> bool
pub fn matches(&self, file: &ScannedFile) -> bool
The file on disk is the one this record describes (by size and modification time; contents aren’t read).
Sourcepub fn is_settled(&self) -> bool
pub fn is_settled(&self) -> bool
Nothing left to do for this file while it’s unchanged.
Trait Implementations§
Source§impl Clone for FileRecord
impl Clone for FileRecord
Source§impl Debug for FileRecord
impl Debug for FileRecord
Source§impl<'de> Deserialize<'de> for FileRecord
impl<'de> Deserialize<'de> for FileRecord
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
impl Eq for FileRecord
Source§impl PartialEq for FileRecord
impl PartialEq for FileRecord
Source§impl Serialize for FileRecord
impl Serialize for FileRecord
impl StructuralPartialEq for FileRecord
Auto Trait Implementations§
impl Freeze for FileRecord
impl RefUnwindSafe for FileRecord
impl Send for FileRecord
impl Sync for FileRecord
impl Unpin for FileRecord
impl UnsafeUnpin for FileRecord
impl UnwindSafe for FileRecord
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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