diff --git a/docs/docs/schemas/doc-model/1.json b/docs/docs/schemas/doc-model/1.json index 78c2c37..ac3c530 100644 --- a/docs/docs/schemas/doc-model/1.json +++ b/docs/docs/schemas/doc-model/1.json @@ -87,6 +87,13 @@ "name": { "type": "string" }, + "sizes": { + "description": "What it takes, as a struct's `sizes`.", + "items": { + "$ref": "#/definitions/SizeRange" + }, + "type": "array" + }, "type": { "$ref": "#/definitions/Type" } @@ -820,7 +827,7 @@ "additionalProperties": { "type": "string" }, - "description": "Its parameters (`@framing`'s dictionary form, less `name`), each\nvalue as written.", + "description": "Its parameters (`@framing`'s or `@handshake`'s dictionary form, less\n`name`), each\nvalue as written.", "type": "object" }, "source": { @@ -976,6 +983,13 @@ ], "description": "`None` when the function has no reply at all; [`Type::Unit`] for `()`." }, + "returns_sizes": { + "description": "What the reply takes, as a struct's `sizes`.", + "items": { + "$ref": "#/definitions/SizeRange" + }, + "type": "array" + }, "throws": { "description": "The errors it declares with `!`, each a reference to the error.", "items": { @@ -1012,7 +1026,7 @@ "type": "boolean" }, "reason": { - "description": "The `@unverified` reason, when it's given up and the marker carries\none.", + "description": "The `@unverified` reason, when it's given up and the marker carries\none: the plain form's, or the keyed form's for this guarantee. The\npackage's, where it acknowledges the guarantee and the marker has none.", "type": [ "string", "null" @@ -1623,7 +1637,7 @@ "type": "string" }, "unverified": { - "description": "Whether it's marked `@unverified`.", + "description": "Whether it gives something up: some guarantee isn't held, whether the\nprotocol's own `@unverified` or the package's `unverified` says why.", "type": "boolean" } }, @@ -1655,6 +1669,39 @@ ], "type": "object" }, + "SizeRange": { + "description": "How many bytes a type takes in one data format: at least `min` and at\nmost `max`, from the format's size rules in the specification\n([`crate::schema::ir::size`]).", + "properties": { + "format": { + "description": "The format, by its wire name (`packed@1`).", + "type": "string" + }, + "max": { + "description": "The most. Absent where there is no bound: a `string` or a `T[]` with\nno maximum, or a type that contains itself with no `@max_depth`.", + "format": "uint64", + "minimum": 0, + "type": [ + "integer", + "null" + ] + }, + "min": { + "description": "The fewest bytes any value takes.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "upper_bound": { + "description": "`max` is only a bound that no value is known to reach (none of the\nofficial formats has one). Absent otherwise.", + "type": "boolean" + } + }, + "required": [ + "format", + "min" + ], + "type": "object" + }, "Source": { "description": "Where a [`Choice`] came from.", "oneOf": [ @@ -1670,7 +1717,7 @@ }, { "const": "core_default", - "description": "Core's default (`packed@1`, `datagram@2`, `comline@1`).", + "description": "Core's default (`packed@1`, `datagram@3`, `comline@2`; `comline@1`\nwith a stated framing; `datagram@2` and `comline@1` for a version\nbuilt before they moved).", "type": "string" }, { @@ -1828,6 +1875,13 @@ }, "name": { "type": "string" + }, + "sizes": { + "description": "What it takes in each format its package's protocols use, those\nwith size rules (the official ones). Absent where it can't be told\n(a `union` in it) and in a model of a built version, which keeps no\nprotocol to say which formats.", + "items": { + "$ref": "#/definitions/SizeRange" + }, + "type": "array" } }, "required": [ @@ -1857,6 +1911,13 @@ "name": { "type": "string" }, + "sizes": { + "description": "As for a struct.", + "items": { + "$ref": "#/definitions/SizeRange" + }, + "type": "array" + }, "variants": { "items": { "type": "string" @@ -2093,6 +2154,13 @@ "name": { "type": "string" }, + "sizes": { + "description": "What the type it names takes; as for a struct.", + "items": { + "$ref": "#/definitions/SizeRange" + }, + "type": "array" + }, "target": { "$ref": "#/definitions/Type" }