Skip to main content

Module resolve

Module resolve 

Source
Expand description

Resolving retained items to typed documents (spec 004, 3.1.6 and 3.1.7).

The host owns storage; Rustev checks what the host returns. Expiry is decided at the caller’s now_ms before any byte is resolved and takes precedence over erasure. External bytes come from a synchronous, fallible Resolver bounded before allocation by the host and checked again here; a resolver error or panic is inaccessible, never missing or available. Bytes must be the record canonical document the digest names: a digest mismatch or invalid JSON is corrupt; intact bytes of the wrong schema, shape, form or identity are mismatched.

Structs§

Budget
The per-case budget of resolved bytes, external items included.
NoExternal
A host with no external store: every external item is inaccessible.

Enums§

ItemFailure
Why an item cannot contribute.
Resolution
What a host returns for an external reference.

Traits§

Resolver
The host’s synchronous byte provider. reference is opaque: it is never an instruction to fetch a URL. The host bounds its read by max_bytes before allocating.

Functions§

check_bytes
Check resolved bytes against the item’s declaration and parse them.
item_bytes
The item’s bytes, charged to budget, before any content check.
resolve_item
Resolve and check one item as a T document at now.