Skip to main content

Module code

Module code 

Source
Expand description

Code storage trait (RFC-005).

Adapters must implement CodeStore and prove atomic single-winner claim behaviour by running the conformance suite (RFC-023).

Structs§

ClaimRequest
Parameters for a claim attempt.
CodeRecord
Parameters for inserting a new code record.
RedeemableCode
Record returned by a successful find_redeemable call.

Traits§

CodeStore
Atomic, single-winner code storage (RFC-005).

Functions§

code_lookup_candidates
Derive all candidate lookup keys for a normalized code value.
expires_at_from_ttl
Compute an expires_at Unix timestamp from a now value and a TTL.