Skip to main content

Module trust

Module trust 

Source
Expand description

Trust and lifecycle frontmatter: generated, verified, status, and stale_after (§5.2 to §5.5).

These four keys let a consumer answer “how much should I trust this” and “is it still current” from frontmatter alone. All are optional, and their absence is meaningful rather than invalid: a concept with no trust frontmatter is TrustTier::Unverified and status: stable, and must never be rejected (§11).

Two rules from the spec are encoded here rather than left to callers:

Structs§

Generated
How the current content was produced (§5.2): generated: { by, at }.
Verification
A single verification event (§5.2): { by, at }.

Enums§

Status
A concept’s lifecycle status (§5.4). An absent key means Status::Stable.
TrustTier
A concept’s trust tier, derived from verified (§5.3).

Constants§

STATUS_VALUES
The status values §5.4 defines.

Functions§

is_stale_at
Whether a concept with this stale_after timestamp is stale at now.
is_stale_on
Whether a concept with this stale_after timestamp is stale on today.
latest_verification
Returns the verification with the latest parseable at (§5.2).