Enum feattle_core::last_reload::LastReload
source · pub enum LastReload {
Never,
NoData {
reload_date: DateTime<Utc>,
},
Data {
reload_date: DateTime<Utc>,
version: i32,
version_date: DateTime<Utc>,
},
}
Expand description
Store details of the last time the data was synchronized by calling
crate::Feattles::reload()
.
Variants§
Never
The data was never updated and all feattles carry their default values.
NoData
The reload finished with success, but no data was found. All feattle carry their default values.
Data
The reload finished with success.
Implementations§
source§impl LastReload
impl LastReload
sourcepub fn reload_date(self) -> Option<DateTime<Utc>>
pub fn reload_date(self) -> Option<DateTime<Utc>>
Indicate when, if ever, a reload finished with success.
sourcepub fn version(self) -> Option<i32>
pub fn version(self) -> Option<i32>
Indicate which is, if any, the current data version. Note that the value 0
is used for
LastReload::NoData
.
sourcepub fn version_date(self) -> Option<DateTime<Utc>>
pub fn version_date(self) -> Option<DateTime<Utc>>
Indicate when, if known, this data version was created.
Trait Implementations§
source§impl Clone for LastReload
impl Clone for LastReload
source§fn clone(&self) -> LastReload
fn clone(&self) -> LastReload
Returns a copy 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 LastReload
impl Debug for LastReload
source§impl PartialEq<LastReload> for LastReload
impl PartialEq<LastReload> for LastReload
source§fn eq(&self, other: &LastReload) -> bool
fn eq(&self, other: &LastReload) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for LastReload
impl Serialize for LastReload
impl Copy for LastReload
impl Eq for LastReload
impl StructuralEq for LastReload
impl StructuralPartialEq for LastReload
Auto Trait Implementations§
impl RefUnwindSafe for LastReload
impl Send for LastReload
impl Sync for LastReload
impl Unpin for LastReload
impl UnwindSafe for LastReload
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