pub struct UpdateCheckCache {
pub checked_at_unix: u64,
pub latest_tag: Option<String>,
}Expand description
Cached result of the last network update check.
Fields§
§checked_at_unix: u64Unix seconds at which the network was last queried.
latest_tag: Option<String>The latest release tag seen, or None when the check completed but
produced no usable tag (e.g. the release had no publishable assets).
Implementations§
Source§impl UpdateCheckCache
impl UpdateCheckCache
Sourcepub fn load(path: &Path) -> Option<Self>
pub fn load(path: &Path) -> Option<Self>
Read the cache, returning None for “absent, unreadable, or corrupt”.
A damaged cache is indistinguishable from no cache for our purposes: both mean “we do not know, go ask”. Nothing here is worth surfacing an error for.
Trait Implementations§
Source§impl Clone for UpdateCheckCache
impl Clone for UpdateCheckCache
Source§fn clone(&self) -> UpdateCheckCache
fn clone(&self) -> UpdateCheckCache
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UpdateCheckCache
impl Debug for UpdateCheckCache
Source§impl<'de> Deserialize<'de> for UpdateCheckCache
impl<'de> Deserialize<'de> for UpdateCheckCache
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 UpdateCheckCache
Source§impl PartialEq for UpdateCheckCache
impl PartialEq for UpdateCheckCache
Source§impl Serialize for UpdateCheckCache
impl Serialize for UpdateCheckCache
impl StructuralPartialEq for UpdateCheckCache
Auto Trait Implementations§
impl Freeze for UpdateCheckCache
impl RefUnwindSafe for UpdateCheckCache
impl Send for UpdateCheckCache
impl Sync for UpdateCheckCache
impl Unpin for UpdateCheckCache
impl UnsafeUnpin for UpdateCheckCache
impl UnwindSafe for UpdateCheckCache
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