pub async fn evaluate(
provider: &dyn ReleaseProvider,
current: &Version,
policy: UpdatePolicy,
interval: Duration,
state_path: &Path,
now_unix: i64,
) -> Result<PolicyDecision>Expand description
Run the synchronous, throttled pre-run update check.
Returns PolicyDecision::NoAction immediately when policy is
UpdatePolicy::Disabled (zero overhead) or when the last check was
within interval of now_unix. Otherwise queries provider, records
the check in the state file regardless of outcome (so the throttle
advances), and reports whether a newer release is available.
now_unix is the current Unix timestamp in seconds, injected so the
throttle is deterministic in tests.
ยงErrors
Propagates a provider error from ReleaseProvider::latest_release.