Skip to main content

Module engine

Module engine 

Source
Expand description

The pure heart of the gate: run a check against a provider, then fold the result into a status honoring offline grace — and failing closed on an authoritative denial. Extracted into a single pure, testable function.

Structs§

Resolution
The verdict of a finished check, ready for the UI/log.

Functions§

resolve
Fold a check result into a LicenseStatus, stamping last_validated on success and honoring the offline grace window. Fail closed: CheckErr::Denied never rides grace. (Pure — the caller decides when to persist state.)
run_check
Run a full validation against the provider. The validate → activate → re-validate dance is the provider’s concern; progress receives human-readable step messages. Returns a definitive verdict (Ok(valid)) or a CheckErr distinguishing an authoritative denial from a transient connectivity failure.