Expand description
A call’s forms by its operation’s types (core §5.1 “The forms”, §5.2 “The error form”, §7.5, §7.6; #985’s C4c): every operation of every contract travels in them, whatever its types’ kind.
request, a query's payload CH · record the `request` type's tag, width bit 0
value, a reply's payload CH · run · seq · record the `response` type's tag (`summary`'s on a summary)
error, a reply_err's payload CH · run · seq · error the `error` type's tag, 0 when it declares noneForms::of reads an operation’s four types once: each one’s tag
(FormType::tag), which only a packed type defines (§7.6), and a
packed type’s layout, which reads its record under the tag CH carried
(FormType::check). wire parses and writes the forms without a
contract; this module adds what the types say:
- the writers:
Forms::request,Forms::value,Forms::summaryandForms::error, the last refusing a detail on an operation that declares noerrortype (WriteRefusal::Undeclared, §5.2’s MUST NOT) and what §7.5’s writer refuses; - the owner’s read of a request (
Forms::read_request): §7.5’s parse, then a packed record under CH’s tag, either refusal the owner’sinvalid_request(§5.1, “The request”).
A JSON Schema, protobuf or raw record is carried as its bytes: the
runtime encodes and decodes it, on the contract’s encoding (§7.2).
A record’s time fields count from the deployment epoch, the writer’s
and the reader’s to give (§8.6): no form carries one.
Structs§
- Form
Type - One of an operation’s types as its forms carry it: the tag CH holds, and a packed type’s layout, which reads its record under that tag.
- Forms
- An operation’s types as its forms carry them (core §5.1, §5.2).
Enums§
- Request
Refusal - Why an owner refuses a request,
invalid_requesteither way (core §5.1, “The request”). - Write
Refusal - What
Forms::errorrefuses to write.