fn remote_check_needed(&self) -> NeedsCheck {
        // immediately after an update versions will not match indicating stale data
        if SELF_VERSION != self.checked_with {
            return NeedsCheck::Yes;
        }

        // if true, it is already known that most self version is not latest so
        // no check is necessary; flag will be reset after updated
        if self.update_needed {
            return NeedsCheck::KnownOutdated;
        }

        let last_check_delta = time::OffsetDateTime::now_utc() - self.last_check;

        // only thing to check is whether check has occurred recently
        if last_check_delta > time::Duration::seconds(DAY_IN_SECS as i64) {
            NeedsCheck::Yes
        } else {
            NeedsCheck::No
        }
    }
/// Returns true if API call should be made to check for new version.
Returns true if API call should be made to check for new version.
Returns true if API call should be made to check for new version .
fn remote_check_needed(&self) -> NeedsCheck {
        // immediately after an update versions will not match indicating stale data
        if SELF_VERSION != self.checked_with {
            return NeedsCheck::Yes;
        }
        // if true, it is already known that most self version is not latest so
        // no check is necessary; flag will be reset after updated
        if self.update_needed {
            return NeedsCheck::KnownOutdated;
        }
        let last_check_delta = time::OffsetDateTime::now_utc() - self.last_check;
        // only thing to check is whether check has occurred recently
        if last_check_delta > time::Duration::seconds(DAY_IN_SECS as i64) {
            NeedsCheck::Yes
        } else {
            NeedsCheck::No
        }
    }
fn remote_check_needed ( & self ) -> NeedsCheck { // immediately after an update versions will not match indicating stale data if SELF_VERSION != self . checked_with { return NeedsCheck :: Yes ; } // if true, it is already known that most self version is not latest so // no check is necessary; flag will be reset after updated if self . update_needed { return NeedsCheck :: KnownOutdated ; } let last_check_delta = time :: OffsetDateTime :: now_utc ( ) - self . last_check ; // only thing to check is whether check has occurred recently if last_check_delta > time :: Duration :: seconds ( DAY_IN_SECS as i64 ) { NeedsCheck :: Yes } else { NeedsCheck :: No } }
Returns true if API call should be made to check for new version.
Returns true if API call should be made to check for new version .
&self
&self