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
sourceimpl 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
sourceimpl Clone for LastReload
impl Clone for LastReload
sourcefn clone(&self) -> LastReload
fn clone(&self) -> LastReload
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for LastReload
impl Debug for LastReload
sourceimpl PartialEq<LastReload> for LastReload
impl PartialEq<LastReload> for LastReload
sourcefn 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 ==. Read more
sourcefn ne(&self, other: &LastReload) -> bool
fn ne(&self, other: &LastReload) -> bool
This method tests for !=.
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more